mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 22:55:52 -06:00
Moved razer-block from features to tweaks
This commit is contained in:
parent
9b206b351d
commit
b92722d453
@ -242,15 +242,6 @@
|
|||||||
"ButtonWidth": "300",
|
"ButtonWidth": "300",
|
||||||
"link": "https://christitustech.github.io/winutil/dev/features/Fixes/RunAdobeCCCleanerTool"
|
"link": "https://christitustech.github.io/winutil/dev/features/Fixes/RunAdobeCCCleanerTool"
|
||||||
},
|
},
|
||||||
"WPFRazerBlock": {
|
|
||||||
"Content": "Block Razer",
|
|
||||||
"category": "Fixes",
|
|
||||||
"panel": "1",
|
|
||||||
"Order": "a046_",
|
|
||||||
"Type": "Button",
|
|
||||||
"ButtonWidth": "300",
|
|
||||||
"link": "https://christitustech.github.io/winutil/dev/features/Fixes/razer"
|
|
||||||
},
|
|
||||||
"WPFPanelnetwork": {
|
"WPFPanelnetwork": {
|
||||||
"Content": "Network Connections",
|
"Content": "Network Connections",
|
||||||
"category": "Legacy Windows Panels",
|
"category": "Legacy Windows Panels",
|
||||||
|
@ -2767,6 +2767,42 @@
|
|||||||
],
|
],
|
||||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOnedrive"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOnedrive"
|
||||||
},
|
},
|
||||||
|
"WPFTweaksRazerBlock": {
|
||||||
|
"Content": "Block Razer software autoinstall",
|
||||||
|
"Description": "It disables the automatic driver installation and denies write permission of Razer folder to system which prevents the automatic install.",
|
||||||
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a031_",
|
||||||
|
"InvokeScript": [
|
||||||
|
"
|
||||||
|
function RazerBlock {
|
||||||
|
$RazerPath = \"C:\\Windows\\Installer\\Razer\"
|
||||||
|
Set-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching\" -Name \"SearchOrderConfig\" -Type DWord -Value 0
|
||||||
|
Set-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Device Installer\" -Name \"DisableCoInstallers\" -Type DWord -Value 1
|
||||||
|
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
|
||||||
|
}
|
||||||
|
RazerBlock
|
||||||
|
"
|
||||||
|
],
|
||||||
|
"UndoScript": [
|
||||||
|
"
|
||||||
|
function RazerUnblock {
|
||||||
|
$RazerPath = \"C:\\Windows\\Installer\\Razer\"
|
||||||
|
Set-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching\" -Name \"SearchOrderConfig\" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Device Installer\" -Name \"DisableCoInstallers\" -Type DWord -Value 0
|
||||||
|
Remove-Item $RazerPath -Recurse -Force
|
||||||
|
New-Item -Path \"C:\\Windows\\Installer\\\" -Name \"Razer\" -ItemType \"directory\"
|
||||||
|
}
|
||||||
|
RazerUnblock
|
||||||
|
"
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/RazerBlock"
|
||||||
|
},
|
||||||
"WPFTweaksDisableNotifications": {
|
"WPFTweaksDisableNotifications": {
|
||||||
"Content": "Disable Notification Tray/Calendar",
|
"Content": "Disable Notification Tray/Calendar",
|
||||||
"Description": "Disables all Notifications INCLUDING Calendar",
|
"Description": "Disables all Notifications INCLUDING Calendar",
|
||||||
|
@ -48,7 +48,6 @@ function Invoke-WPFButton {
|
|||||||
"WPFFixesUpdate" {Invoke-WPFFixesUpdate}
|
"WPFFixesUpdate" {Invoke-WPFFixesUpdate}
|
||||||
"WPFFixesWinget" {Invoke-WPFFixesWinget}
|
"WPFFixesWinget" {Invoke-WPFFixesWinget}
|
||||||
"WPFRunAdobeCCCleanerTool" {Invoke-WPFRunAdobeCCCleanerTool}
|
"WPFRunAdobeCCCleanerTool" {Invoke-WPFRunAdobeCCCleanerTool}
|
||||||
"WPFRazerBlock" {Invoke-WPFRazerBlock}
|
|
||||||
"WPFFixesNetwork" {Invoke-WPFFixesNetwork}
|
"WPFFixesNetwork" {Invoke-WPFFixesNetwork}
|
||||||
"WPFUpdatesdisable" {Invoke-WPFUpdatesdisable}
|
"WPFUpdatesdisable" {Invoke-WPFUpdatesdisable}
|
||||||
"WPFUpdatessecurity" {Invoke-WPFUpdatessecurity}
|
"WPFUpdatessecurity" {Invoke-WPFUpdatessecurity}
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
function Invoke-WPFRazerBlock {
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
Blocks razer software automatic install.
|
|
||||||
.DESCRIPTION
|
|
||||||
It disables the automatic driver installation and denies write permission of razer folder to system which prevents the automatic install.
|
|
||||||
#>
|
|
||||||
$RazerPath = "C:\Windows\Installer\Razer"
|
|
||||||
|
|
||||||
# Disable driver auto-install via registry
|
|
||||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" -Name "SearchOrderConfig" -Type DWord -Value 0
|
|
||||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Device Installer" -Name "DisableCoInstallers" -Type DWord -Value 1
|
|
||||||
|
|
||||||
# Remove and lock install directory
|
|
||||||
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
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user