2020-08-27 16:19:49 +08:00
|
|
|
|
#CleanUp tool 1.0
|
2022-02-18 02:41:30 +08:00
|
|
|
|
#Copyright (C) 2022 Microsoft Corporation
|
2020-08-27 16:19:49 +08:00
|
|
|
|
#Tool to clean PowerToys settings inside AppData folder and registry
|
|
|
|
|
|
|
|
|
|
#Deleting json settings files in %AppData%/Local/Microsoft/PowerToys.
|
|
|
|
|
|
|
|
|
|
[String]$SettingsPath = $Env:LOCALAPPDATA + '\Microsoft\PowerToys'
|
|
|
|
|
|
|
|
|
|
if (Test-Path -Path $SettingsPath -PathType Any)
|
|
|
|
|
{
|
2023-05-08 19:31:06 +08:00
|
|
|
|
Remove-Item -Path $SettingsPath -Recurse
|
2020-08-27 16:19:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#Deleting SuperFancyZones registry key
|
|
|
|
|
|
|
|
|
|
[String]$SuperFancyZones = "HKCU:\Software\SuperFancyZones"
|
|
|
|
|
|
|
|
|
|
if (Test-Path -Path $SuperFancyZones -PathType Any)
|
|
|
|
|
{
|
2023-05-08 19:31:06 +08:00
|
|
|
|
Remove-Item -Path $SuperFancyZones -Recurse
|
2020-08-27 16:19:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#Deleting PowerRename registry key
|
|
|
|
|
|
|
|
|
|
[String]$PowerRename = "HKCU:\Software\Microsoft\PowerRename"
|
|
|
|
|
|
|
|
|
|
if (Test-Path -Path $PowerRename -PathType Any)
|
|
|
|
|
{
|
2023-05-08 19:31:06 +08:00
|
|
|
|
Remove-Item -Path $PowerRename -Recurse
|
2020-08-27 16:19:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#Deleting ImageResizer registry key
|
|
|
|
|
|
|
|
|
|
[String]$ImageResizer = "HKCU:\Software\Microsoft\ImageResizer"
|
|
|
|
|
|
|
|
|
|
if (Test-Path -Path $ImageResizer -PathType Any)
|
|
|
|
|
{
|
2023-05-08 19:31:06 +08:00
|
|
|
|
Remove-Item -Path $ImageResizer -Recurse
|
2020-08-27 16:19:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#Deleting DontShowThisDialogAgain registry key
|
|
|
|
|
|
|
|
|
|
[String]$DontShowThisDialogAgain = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\DontShowMeThisDialogAgain\{e16ea82f-6d94-4f30-bb02-d6d911588afd}"
|
|
|
|
|
|
|
|
|
|
if (Test-Path -Path $DontShowThisDialogAgain -PathType Any)
|
|
|
|
|
{
|
2023-05-08 19:31:06 +08:00
|
|
|
|
Remove-Item -Path $DontShowThisDialogAgain
|
2020-08-27 16:19:49 +08:00
|
|
|
|
}
|