Quick Fix - UAC Property error

This commit is contained in:
Chris Titus 2022-09-21 08:55:35 -05:00 committed by GitHub
parent ba3d48b620
commit e770c2d5da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -551,7 +551,6 @@ $WPFdesktop.Add_Click({
$WPFMiscTweaksNum.IsChecked = $true
$WPFMiscTweaksLapPower.IsChecked = $false
$WPFMiscTweaksLapNum.IsChecked = $false
$WPFMiscTweaksDisableUAC.IsChecked = $true
})
$WPFlaptop.Add_Click({
@ -572,7 +571,6 @@ $WPFlaptop.Add_Click({
$WPFMiscTweaksLapNum.IsChecked = $true
$WPFMiscTweaksPower.IsChecked = $false
$WPFMiscTweaksNum.IsChecked = $false
$WPFMiscTweaksDisableUAC.IsChecked = $true
})
$WPFminimal.Add_Click({
@ -593,7 +591,6 @@ $WPFminimal.Add_Click({
$WPFMiscTweaksNum.IsChecked = $false
$WPFMiscTweaksLapPower.IsChecked = $false
$WPFMiscTweaksLapNum.IsChecked = $false
$WPFMiscTweaksDisableUAC.IsChecked = $true
})
$WPFtweaksbutton.Add_Click({
@ -647,17 +644,6 @@ $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"