memstechtips / UnattendedWinstall

Personalized Unattended Answer Files that helps automatically debloat and customize Windows 10 & 11 during the installation process.
MIT License
2.77k stars 338 forks source link

Insecure UAC settings which starts everything as administrator #20

Closed Syntax3rror404 closed 3 months ago

Syntax3rror404 commented 3 months ago

How to fix this issue inside the answer file?

image

LeoTheLegion commented 3 months ago

@Syntax3rror404 I think what you are looking for is on line 243 or find the comment "Disables User Account Control"

image

Either comment it out or delete it

memstechtips commented 3 months ago

Remove all of these entries:

:: Disables User Account Control
reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f

:: Disables User Account Control
reg.exe add "HKU\DefaultUser\SOFTWARE\Microsoft\Windows\CurrentVersion\Privacy" /v UserAccountControlSettings /t REG_DWORD /d 0 /f

:: Disables User Account Control
reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Privacy" /v UserAccountControlSettings /t REG_DWORD /d 0 /f