mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-07-15 16:38:00 +00:00
Deleted lastrun.json (#4714)
* Update Invoke-WPFtweaksbutton.ps1 * Update main.ps1 * Update tweaks.json * Update tweaks.json * Update tweaks.json
This commit is contained in:
@@ -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": "<RemoveEntry>"
|
||||
}
|
||||
],
|
||||
"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"
|
||||
},
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user