There are many possible way to turn off or turn on User Access Control (UAC) in Windows, which frequently pop up a confirmation dialog window to asking for permissions to continue a task which requires elevated administrator rights. Normally UAC can be enabled or disabled by using GUI-based Control Panel. For programmers or developers, it may be useful to be able to enable or disable UAC by using CLI (command line interface) commands, which can be used to automate tasks in batch script.
The ability to enable or disable UAC from Command Prompt is actually using a trick to turn off or on UAC by using registry key. Simply open Command Prompt window as Administrator and run the following command:
To Disable UAC
C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
To Enable UAC
C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f
After the command, computer needs to be restarted for the change to be effective.