Added Disable UAC (#136)

This commit is contained in:
Sarah 2022-09-15 17:48:35 +02:00 committed by GitHub
parent 48a92fedf7
commit 4ea57b0e63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -539,6 +539,7 @@ $WPFdesktop.Add_Click({
$WPFMiscTweaksNum.IsChecked = $true
$WPFMiscTweaksLapPower.IsChecked = $false
$WPFMiscTweaksLapNum.IsChecked = $false
$WPFMiscTweaksDisableUAC.IsChecked = $true
})
$WPFlaptop.Add_Click({
@ -559,6 +560,7 @@ $WPFlaptop.Add_Click({
$WPFMiscTweaksLapNum.IsChecked = $true
$WPFMiscTweaksPower.IsChecked = $false
$WPFMiscTweaksNum.IsChecked = $false
$WPFMiscTweaksDisableUAC.IsChecked = $true
})
$WPFminimal.Add_Click({
@ -579,6 +581,7 @@ $WPFminimal.Add_Click({
$WPFMiscTweaksNum.IsChecked = $false
$WPFMiscTweaksLapPower.IsChecked = $false
$WPFMiscTweaksLapNum.IsChecked = $false
$WPFMiscTweaksDisableUAC.IsChecked = $true
})
$WPFtweaksbutton.Add_Click({
@ -632,6 +635,17 @@ $WPFtweaksbutton.Add_Click({
./OOSU10.exe ooshutup10.cfg /quiet
$WPFEssTweaksOO.IsChecked = $false
}
If ( $WPFMiscTweaksDisableUAC.IsChecked -eq $true) {
Write-Host "Disabling UAC..."
# This below is the pussy mode which can break some apps. Please. Leave this on 1.
# below i will show a way to do it without breaking some Apps that check UAC. U need to be admin tho.
# Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableLUA" -Type DWord -Value 0
Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Type DWord -Value 0 # Default is 5
# This will set the GPO Entry in Security so that Admin users elevate without any prompt while normal users still elevate and u can even leave it ennabled.
# It will just not bother u anymore
$WPFMiscTweaksDisableUAC.IsChecked = $false
}
If ( $WPFEssTweaksRP.IsChecked -eq $true ) {
Write-Host "Creating Restore Point in case something bad happens"
Enable-ComputerRestore -Drive "$env:SystemDrive"