0

I had disabled UAC with the command Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Value 0

and reenabled UAC with Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Value 1.

My Problem is now that the UAC Windows looks different than it did before toggling UAC. It now shows a field for entering the administrator password.

Any idea how I can set UAC to the "normal" appearing window? I cannot provide a screenshot of the UAC it always shows an empty image.

Thank you for any help!

NiMux
  • 826
  • 7
  • 16
p3ppi
  • 1
  • 3
  • It seems like this registry change also somehow toggled the local security policy of your system. Check out [this documentation](https://learn.microsoft.com/en-us/windows/security/identity-protection/user-account-control/user-account-control-security-policy-settings) about it. To change it back to before you have you change the secpol for `User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode` to `Elevate without prompting Allows privileged accounts to perform an operation that requires elevation without requiring consent or credentials.` – Nico Nekoru Jun 20 '22 at 06:52
  • To do this with powershell check out [this post](https://stackoverflow.com/questions/23260656/modify-local-security-policy-using-powershell) – Nico Nekoru Jun 20 '22 at 06:53
  • I think you missing the point of [UAC](https://learn.microsoft.com/windows/security/identity-protection/user-account-control/how-user-account-control-works). It is designed to get the user attention if a process might impact the security of your system. Therefore a process (as a PowerShell script) can't just give itself higher access than it is supposed to (without the users attention) if you tweak this in some way (which should require to accept UAC at least once), you have creating a security hole and might as well just decide to completely disable UAC. – iRon Jun 20 '22 at 12:34
  • @iRon I think you missing the point of my question – p3ppi Jun 20 '22 at 15:08

1 Answers1

0

One way:

REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 5 /f

another way:

Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Value 5

Basically the same. This enables UAC with the original UAC window, which means without a prompt for the password. If you want that password prompt change the value from 5 to 1.

Thanks @Nico Nekoru for the links

NiMux
  • 826
  • 7
  • 16
p3ppi
  • 1
  • 3