I want to make my UAC to always require admin password. I seen some tutorials for windows 7, and with gpedit, however I have home version and gpedit is not included and I couldn't find any tutorial without it. Is it possible to do it through regedit?
An even simpler or easier way is once you find the Value name: block, "ConsentPromptBehaviorAdmin" go to the block below which is Value data: and change the number to a "1". It gives you the same result.
This key defines the User Account Control behavior for system administrators. The default value is set to prompt but do not require credentials to be entered. Here are all possible values:
- 0: A value of 0 allows administrators to perform operations that require elevation without consent (meaning prompts) or credentials (meaning authentication).
- 1: A value of 1 requires the admin to enter username and password when operations require elevated privileges on a secure desktop.
- 2: The value of 2 displays the UAC prompt that needs to be permitted or denied on a secure desktop. No authentication is required.
- 3: A value of 3 prompts for credentials.
- 4: A value of 4 prompts for consent by displaying the UAC prompt.
- 5: The default value of 5 prompts for consent for non-Windows binaries.
You can paste this snippet into an Administrative PowerShell prompt:
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Value 1
Set-ItemProperty command is essentially used to change values of registries. The rest of the parameters of the prompt are relatively intuitive, but I'll go through the rest.
As seen in other answers/responses, the path of the registry (can also be accessed with
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System - but in this case
HKEY_LOCAL_MACHINE is shortened to
HKLM and appended with
:. So in order to access the registry, we use the
-Path option (or flag) to note that the following string (surrounded by quotes
") is the desired path of the registry we want to update.
The next option we need to pass is
-Name. Which (you guessed it) is for the name of the value we want to update. So now naturally we pass in the value
"ConsentPromptBehaviorAdmin". The quotes are necessary because the
-Name option expects a string value.
Finally, we set the
-Value value to
1. Which by the Windows 10 operating system interprets this as: "Let's basically just always ask for administrative permission for administrative tasks."
Or in their words:
This option prompts the Consent Admin to enter his or her user name and password (or another valid admin) when an operation requires elevation of privilege. This operation occurs on the secure desktop.
Source for registry details: Microsoft docs.