Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic (http://www.programmingforums.org/forum18.html)
-   -   Registry edit Programatically (http://www.programmingforums.org/showthread.php?t=14541)

venkatramasamy Nov 21st, 2007 1:23 AM

Registry edit Programatically
 
Hi,

I want to disable UAC in Windows vista Programatically
for that i need to Modify the Register as the below shown

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System

EnableLUA=0

or
need to execute the following
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

while executing the above line from run that prompts access denied in Commant prompt,

tell me how to include the Admin rights while opening the command prompt from the Run

is anybody there to help, how to do the above through program

Thanks in advance
Vennkatramasamy SN

venkatramasamy Nov 21st, 2007 5:36 AM

Re: Registry edit Programatically
 
Hi to every one

Problem solved with the Following code

Dim myReg As New Registry, KeyFound As Boolean


KeyFound = myReg.UpdateKey(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLUA", "1")
If KeyFound = True Then
MsgBox "UAC Disabled SuccessFully", vbInformation
Else
MsgBox "UAC Disable try Failed", vbCritical
End If

Note:
Add "Registry access functions" to reference

Thanks to all

Venkatramasamy SN


All times are GMT -5. The time now is 3:25 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC