How to enanble/disable UAC via code.
Hi all,
how to enanble/disable UAC via code.in wndows server 2008.Please provide me sample code.Thanks and regards, Anandha Babu M.
January 24th, 2011 6:13am
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)
Free Windows Admin Tool Kit Click here and download it now
January 24th, 2011 6:27am
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
January 24th, 2011 2:54pm
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 LiPlease 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.
Free Windows Admin Tool Kit Click here and download it now
January 25th, 2011 1:52am