mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-12-17 09:45:22 +00:00
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
This commit is contained in:
parent
c2cb00fc68
commit
f671ad4518
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user