diff --git a/config/tweaks.json b/config/tweaks.json index e9bf9772..18330d32 100644 --- a/config/tweaks.json +++ b/config/tweaks.json @@ -1090,29 +1090,14 @@ "Description": "Restores the classic context menu when right-clicking in File Explorer, replacing the simplified Windows 11 version.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "registry": [ - { - "Path": "HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\\InprocServer32", - "Name": "(default)", - "Value": "", - "Type": "String", - "OriginalValue": "" - } - ], "InvokeScript": [ " - New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\" - Write-Host Restarting explorer.exe ... - Stop-Process -Name \"explorer\" -Force + New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name InprocServer32 -Value \"\" -Force + Stop-Process -Name explorer " ], "UndoScript": [ - " - Remove-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Recurse -Confirm:$false -Force - # Restarting Explorer in the Undo Script might not be necessary, as the Registry change without restarting Explorer does work, but just to make sure. - Write-Host Restarting explorer.exe ... - Stop-Process -Name \"explorer\" -Force - " + "Remove-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Recurse" ], "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/rightclickmenu" }, diff --git a/functions/public/Invoke-WPFtweaksbutton.ps1 b/functions/public/Invoke-WPFtweaksbutton.ps1 index e47a1542..1c413a66 100644 --- a/functions/public/Invoke-WPFtweaksbutton.ps1 +++ b/functions/public/Invoke-WPFtweaksbutton.ps1 @@ -82,6 +82,5 @@ function Invoke-WPFtweaksbutton { Write-Host "=================================" Write-Host "-- Tweaks are Finished ---" Write-Host "=================================" - @($tweaks | Where-Object { $sync.configs.tweaks.$_.registry -or $sync.configs.tweaks.$_.service }) | ConvertTo-Json | Out-File "$env:LocalAppData\winutil\lastrun.json" -Force } } diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 63e2aa46..5fb60838 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -368,15 +368,6 @@ $sync["Form"].Add_ContentRendered({ Invoke-WPFTab "WPFTab1BT" # Default to install tab } - if (-not $Config -and (Test-Path "$winutildir\lastrun.json")) { - $drifted = @(Get-Content "$winutildir\lastrun.json" | ConvertFrom-Json | Where-Object { $_ -notin (Invoke-WinUtilCurrentSystem -CheckBox "tweaks") }) - if ($drifted.Count -gt 0 -and [System.Windows.MessageBox]::Show("$($drifted.Count) tweak(s) were reverted since last run. Re-select them?", "Winutil", "YesNo", "Question") -eq "Yes") { - Update-WinUtilSelections -flatJson $drifted - Reset-WPFCheckBoxes -doToggles $false - Invoke-WPFTab "WPFTab2BT" - } - } - $sync["Form"].Focus() })