none
How to enanble/disable UAC via code. RRS feed

  • Question

  • Hi all,

     how to enanble/disable UAC via code.in wndows server 2008.Please provide me sample code.


    Thanks and regards, Anandha Babu M.
    Monday, January 24, 2011 11:08 AM

Answers

  • if you google for "reg.exe disable uac" youll get samples to disable uac via registry. depending on your language you program in, there will be methods to access the registry (.net its for example in namespace microsoft.win32.registry)
    Monday, January 24, 2011 11:23 AM
  • try this 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 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
    Monday, January 24, 2011 7:53 PM
  • Hi,

     

    Thanks for posting here.

     

    You may also take look the old thread below which discuss same requirement and achieve the goal by using powershell:

     

    http://social.technet.microsoft.com/Forums/en-US/winserversecurity/thread/0aeac9d8-3591-4294-b13e-825705b27730

     

    Thanks.

     

    Tiger Li


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Tuesday, January 25, 2011 6:51 AM

All replies