Skip to content

Instantly share code, notes, and snippets.

@gdlmx
Created April 21, 2018 12:41
Show Gist options
  • Save gdlmx/b9ccb6600df93390cb50e817c0ce2e24 to your computer and use it in GitHub Desktop.
Save gdlmx/b9ccb6600df93390cb50e817c0ce2e24 to your computer and use it in GitHub Desktop.
Disable Startup Task of Windows UWP
# Windows task manager cannot disable some auto startup UWP Apps
# This script provides an alternative method to disable those Apps
# Refs:
# https://docs.microsoft.com/en-us/uwp/api/windows.applicationmodel.startuptask
# Author: Mingxuan Lin
function DisableUWPStartupTask ([String]$Name) {
$p = Get-AppxPackage -Name $Name
$PkgFN=$p.PackageFamilyName
Get-Item -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\$PkgFN\*StartupTask" | foreach {
Set-ItemProperty -Path $_.PSPath -Name "LastDisabledTime" -Value 0x5adb18fe
Set-ItemProperty -Path $_.PSPath -Name "State" -Value 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment