Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions config/tweaks.json
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,41 @@
],
"link": "https://winutil.christitus.com/code-reference/tweaks/z--advanced-tweaks---caution/razerblock"
},
"WPFTweaksLogiBlock": {
"Content": "Logitech Download Assistant Auto-Install - Disable",
"Description": "Blocks the Logi Download Assistant that Windows Update keeps reinstalling with Logitech device drivers. Logitech hardware keeps working without it.",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"InvokeScript": [
"
Stop-Process -Name \"logi_download_assistant\" -Force -ErrorAction SilentlyContinue

$ProgramFiles64 = if ($Env:ProgramW6432) { $Env:ProgramW6432 } else { $Env:ProgramFiles }
$LogiPath = \"$ProgramFiles64\\LogiDownloadAssistant\"

if (Test-Path $LogiPath) {
Remove-Item $LogiPath\\* -Recurse -Force
} else {
New-Item -Path $LogiPath -ItemType Directory
}

icacls $LogiPath /deny \"*S-1-1-0:(W)\"
if ($LASTEXITCODE -ne 0) { throw \"icacls failed to deny write access on $LogiPath (exit code $LASTEXITCODE)\" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Propagate the icacls failure before reporting completion

When icacls returns nonzero—for example because the directory ACL cannot be modified—this new throw still does not make the tweak fail: Invoke-WinUtilScript.ps1:32-49 catches the resulting runtime exception without rethrowing or returning failure, after which Invoke-WinUtilTweaks.ps1:84 unconditionally logs that the tweak completed. Fresh evidence in the hardened version is that the newly added exit-code check is therefore swallowed by the existing wrapper, so callers can still treat an unapplied block as successful; propagate a failure result so completion is not reported.

AGENTS.md reference: AGENTS.md:L102-L102

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the standard execution model across all WinUtil tweaks. Invoke-WinUtilScript catches runtime exceptions so errors are logged without crashing the runner or aborting other queued tweaks. Propagating tweak failure status to Invoke-WinUtilTweaks would require changes to the core execution engine across the entire codebase, which is out of scope. You can safely disregard this!

"
],
"UndoScript": [
"
$ProgramFiles64 = if ($Env:ProgramW6432) { $Env:ProgramW6432 } else { $Env:ProgramFiles }
$LogiPath = \"$ProgramFiles64\\LogiDownloadAssistant\"

if (Test-Path $LogiPath) {
icacls $LogiPath /remove:d \"*S-1-1-0\"
if ($LASTEXITCODE -ne 0) { throw \"icacls failed to remove the write-deny rule on $LogiPath (exit code $LASTEXITCODE)\" }
}
"
],
"link": "https://winutil.christitus.com/code-reference/tweaks/z--advanced-tweaks---caution/logiblock"
},
"WPFTweaksDisableNotifications": {
"Content": "System Tray Notifications & Calendar - Disable",
"Description": "Disables all Notifications INCLUDING Calendar.",
Expand Down