UAC default reg value is wrong
Closed this issue · 3 comments
Hi,
I created a custom xml using your awesome templates and found that in every xml when you enable back UAC the EnableLUA registry has a decimal value of 3 while in every document it's 1.
I think 1 is the correct value for this.
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-gpsb/958053ae-5397-4f96-977f-b7700ee461ec
:: Enables User Account Control (Default Value)
reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 3 /f
In the LTSC version of the script that Reg entry doesn't exist.... UAC is "re-enabled" with a command script instead.
:: Disables User Account Control Temporarily - Without this entry, some commands in the currentuser.cmd script will fail. UAC is re-enabled in the currentuser.cmd script again. reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f
<Description>Registry Entry to Execute the HKCU Registry Entry Script the First Time a New User Logs In</Description> <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Runonce" /v "currentuser" /t REG_SZ /d "C:\Windows\Setup\Scripts\currentuser.cmd" /f</Path>
So, don't know what the code means you quote....
LOL... I'm an idiot. I was searching for UAC. LOL Nevermind.
Just an update before closing this issue, there are actually 2 keys that handle UAC.
cmd.exe /c reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 1 /f 2>&1 | Out-Null
cmd.exe /c reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 2 /f 2>&1 | Out-Null
The first one is if UAC is disabled or enabled, 1
is Enabled, 0
is Disabled, so you are actually correct @leeuniverse the value should be 1
not 3
.
The second key however determines the "slider" level in the Control Panel, and the default for that is 3
as far as I know (I set it to 2
in v2.0.0)
With that being said, in v2.0.0 of the file, the correct values are used.