Created
April 21, 2018 12:41
-
-
Save gdlmx/b9ccb6600df93390cb50e817c0ce2e24 to your computer and use it in GitHub Desktop.
Disable Startup Task of Windows UWP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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