Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 21st, 2007, 12:23 AM   #1
venkatramasamy
Newbie
 
Join Date: Oct 2007
Location: INDIA
Posts: 19
Rep Power: 0 venkatramasamy is an unknown quantity at this point
Send a message via AIM to venkatramasamy
Post 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

Last edited by venkatramasamy; Nov 21st, 2007 at 12:44 AM.
venkatramasamy is offline   Reply With Quote
Old Nov 21st, 2007, 4:36 AM   #2
venkatramasamy
Newbie
 
Join Date: Oct 2007
Location: INDIA
Posts: 19
Rep Power: 0 venkatramasamy is an unknown quantity at this point
Send a message via AIM to venkatramasamy
Thumbs up 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
venkatramasamy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
very simple question. make button change number in edit box nickm Delphi 2 Apr 29th, 2006 10:47 PM
registry writing need code correction tayspen C# 0 Oct 26th, 2005 8:19 PM
Exception writing to registry... why? kurifu C# 3 Jun 4th, 2005 10:14 PM
Reading edit controls (I have tried, code provided) layer C++ 5 Apr 27th, 2005 7:31 PM
Edit registry via Command Prompt/Batch? [SOLVED] darklegend Other Scripting Languages 6 Mar 23rd, 2005 9:47 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:30 AM.

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