mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 22:55:52 -06:00
Squashed commit of the following:
commit c674d5eb605b549d8d8b247749954a98197277b4 Author: Saksham Singh <sakshamsingh.93502@gmail.com> Date: Wed Sep 11 19:34:44 2024 +0530 desc update commit 3d8bf2bdc9c382a9f087b9ac6e63cb8604c99698 Author: Saksham Singh <sakshamsingh.93502@gmail.com> Date: Wed Sep 11 19:30:23 2024 +0530 Added Razer Block Added the razer block by chris titus under the Fixes Section
This commit is contained in:
parent
19a3c7070a
commit
9b206b351d
@ -242,6 +242,15 @@
|
|||||||
"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",
|
||||||
|
@ -48,6 +48,7 @@ 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}
|
||||||
|
22
functions/public/Invoke-WPFRazerBlock.ps1
Normal file
22
functions/public/Invoke-WPFRazerBlock.ps1
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
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