From f671ad4518c4f67bab54222e1b8bc503403129d6 Mon Sep 17 00:00:00 2001 From: Gabi <182965942+GabiNun@users.noreply.github.com> Date: Fri, 12 Dec 2025 16:55:27 +0200 Subject: [PATCH] Update-WPFTweaksRazerBlock (#3770) * Update WPFTweaksRazerBlock's InvokeScript * Format fix for WPFTweaksRazerBlock * Update WPFTweaksRazerBlock * Update WPFTweaksRazerBlock * Update WPFTweaksRazerBlock * Better format for WPFTweaksRazerBlock's InvokeScript * Better format for WPFTweaksRazerBlock's InvokeScript * Fomat fix on WPFTweaksRazerBlock --- config/tweaks.json | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/config/tweaks.json b/config/tweaks.json index 12c692c1..10fc9e0b 100644 --- a/config/tweaks.json +++ b/config/tweaks.json @@ -2653,20 +2653,21 @@ ], "InvokeScript": [ " - $RazerPath = \"C:\\Windows\\Installer\\Razer\" - Remove-Item $RazerPath -Recurse -Force - New-Item -Path \"C:\\Windows\\Installer\\\" -Name \"Razer\" -ItemType \"directory\" - $Acl = Get-Acl $RazerPath - $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule(\"NT AUTHORITY\\SYSTEM\",\"Write\",\"ContainerInherit,ObjectInherit\",\"None\",\"Deny\") - $Acl.SetAccessRule($Ar) - Set-Acl $RazerPath $Acl + $RazerPath = \"C:\\Windows\\Installer\\Razer\" + + if (Test-Path $RazerPath) { + Remove-Item $RazerPath\\* -Recurse -Force + } + else { + New-Item -Path $RazerPath -ItemType Directory + } + + icacls $RazerPath /deny \"Everyone:(W)\" " ], "UndoScript": [ " - $RazerPath = \"C:\\Windows\\Installer\\Razer\" - Remove-Item $RazerPath -Recurse -Force - New-Item -Path \"C:\\Windows\\Installer\\\" -Name \"Razer\" -ItemType \"directory\" + icacls \"C:\\Windows\\Installer\\Razer\" /remove:d Everyone " ], "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/razerblock"