Cari Blog Ini

Diberdayakan oleh Blogger.
Tampilkan postingan dengan label USER ACCOUNT CONTROL. Tampilkan semua postingan
Tampilkan postingan dengan label USER ACCOUNT CONTROL. Tampilkan semua postingan

Disable and Enable UAC in Command Prompt

Command Prompt
Normally we never recommend disabling User Account Control (UAC) prompts--considering UAC actually does a great job blocking malicious software and people. However, we understand that in some situations UAC is better changed to temporarily disabled. For instance, disabling UAC before running software developments on a machine could help with automation. Manually disabling UAC before such a task and re-enabling it afterwards can be cumbersome. Luckily, just just adding the following commands to a script can speed things along.


Disable UAC:
%windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f

Enable UAC:
%windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f

If this is used in a script, the script of command prompt will need to be run as an administrator. Our suggestion is to create a script to do what you want, add disable UAC to the top of the script, and enable UAC at the bottom. That said, always remember to re-enable UAC.


Disable UAC Prompt for a Single Application

User Account Control Prompt
User Account Control (UAC) prompts are a wonderful feature introduced in Windows Vista that prevents people and code from doing harm to your machine. However, UAC prompts can become a nuisance when you already trust the program. In addition, disabling UAC prompts from a single application is a great way to give users access to specific programs without giving away elevated rights.
  1. Download and Install the Application Compatibility Toolkit from the Microsoft Download Center.
  2. Click Start -> All Programs -> Microsoft Application Compatibility Toolkit (Version Number) -> Compatibility Administrator. Right-click and Run as Administrator.
  3. Press Ctrl + P or right-click on New Database(1) [Untitled_1] select Create New and the Application Fix…
  4. Enter in the details you are Disabling UAC prompts on. Click Next and Next again.
  5. On the Compatibility Fixes screen, check the item RunAsInvoker. Click Next and then Finish.
  6. Select File and then Save As. Keep default file type (.sdb) and save to c:\windows.
  7. Click Start -> All Programs -> Accessories. Right-click and Run as Administrator.
  8. Type cd .. in the command prompt and press Enter. Next type sdbinst c:\windows\<filename>.sbd (the file name is the same as what was created in Step 6). Press Enter.
If successful the command prompt will echo Installation of <filename>.sdb complete.
Now test the program to see in the UAC prompt is disabled.