undo attributes

This commit is contained in:
MyDrift
2024-08-24 17:11:48 +02:00
parent 2d3e43b998
commit 2a4474676c
4 changed files with 4 additions and 8 deletions

View File

@ -16,7 +16,9 @@ function Invoke-WinUtilSnapFlyout {
}
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
taskkill.exe /F /IM "explorer.exe"
Set-ItemProperty -Path $Path -Name EnableSnapAssistFlyout -Value $value
Start-Process "explorer.exe"
} catch [System.Security.SecurityException] {
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
} catch [System.Management.Automation.ItemNotFoundException] {

View File

@ -16,7 +16,9 @@ function Invoke-WinUtilSnapSuggestion {
}
# taskkill.exe /F /IM "explorer.exe"
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
taskkill.exe /F /IM "explorer.exe"
Set-ItemProperty -Path $Path -Name SnapAssist -Value $value
Start-Process "explorer.exe"
} catch [System.Security.SecurityException] {
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
} catch [System.Management.Automation.ItemNotFoundException] {

View File

@ -36,8 +36,4 @@ function Invoke-WPFToggle {
"WPFToggleTaskbarAlignment" {Invoke-WinUtilTaskbarAlignment $ToggleStatus}
"WPFToggleDetailedBSoD" {Invoke-WinUtilDetailedBSoD $ToggleStatus}
}
if ($sync.configs.tweaks.$($button).attributes -contains "epRestart") {
taskkill.exe /F /IM "explorer.exe"
Start-Process "explorer.exe"
}
}