mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-12-17 17:55:28 +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": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
$RazerPath = \"C:\\Windows\\Installer\\Razer\"
|
$RazerPath = \"C:\\Windows\\Installer\\Razer\"
|
||||||
Remove-Item $RazerPath -Recurse -Force
|
|
||||||
New-Item -Path \"C:\\Windows\\Installer\\\" -Name \"Razer\" -ItemType \"directory\"
|
if (Test-Path $RazerPath) {
|
||||||
$Acl = Get-Acl $RazerPath
|
Remove-Item $RazerPath\\* -Recurse -Force
|
||||||
$Ar = New-Object System.Security.AccessControl.FileSystemAccessRule(\"NT AUTHORITY\\SYSTEM\",\"Write\",\"ContainerInherit,ObjectInherit\",\"None\",\"Deny\")
|
}
|
||||||
$Acl.SetAccessRule($Ar)
|
else {
|
||||||
Set-Acl $RazerPath $Acl
|
New-Item -Path $RazerPath -ItemType Directory
|
||||||
|
}
|
||||||
|
|
||||||
|
icacls $RazerPath /deny \"Everyone:(W)\"
|
||||||
"
|
"
|
||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"
|
"
|
||||||
$RazerPath = \"C:\\Windows\\Installer\\Razer\"
|
icacls \"C:\\Windows\\Installer\\Razer\" /remove:d Everyone
|
||||||
Remove-Item $RazerPath -Recurse -Force
|
|
||||||
New-Item -Path \"C:\\Windows\\Installer\\\" -Name \"Razer\" -ItemType \"directory\"
|
|
||||||
"
|
"
|
||||||
],
|
],
|
||||||
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/razerblock"
|
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/razerblock"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user