Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic (http://www.programmingforums.org/forum18.html)
-   -   how to run command prompt with admin rights (http://www.programmingforums.org/showthread.php?t=14542)

venkatramasamy Nov 21st, 2007 12:50 AM

how to run command prompt with admin rights
 
hi,

i need to execute the following line to disable the 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

while executing from run
The command prompt shows error msg like shown below
ERROR:Access Denied

while doing the same task from msconfig,it succeeded, noteable point is

the command promt titile shows like
Administrator: C:\Windows\System32\cmd.exe

where as while runnig from the Run it shows..

C:\Windows\System32\cmd.exe - only

Is anybody there to help me

Thanks in advance

Venkatramsamy SN

Ghost Nov 21st, 2007 2:05 AM

Re: how to run command prompt with admin rights
 
Do you know the admin username and password?

venkatramasamy Nov 21st, 2007 3:23 AM

Re: how to run command prompt with admin rights
 
Hi,

I logged in as administrator, i am asking about programatically run the command with admin rights(logged i as administrator)

Thanks in advance

Ghost Nov 21st, 2007 4:52 AM

Re: how to run command prompt with admin rights
 
I have a program that might be able to help you by doing it for you. But this is a program that someone paid me to make, so the source will say with him, but he said he wouldn't mind if I allowed other to use the product.

http://www.elementsystems.net/progra...s_1_0_0_11.png
NOTE: I'm not sure of the rules of posting links to programs, so please do not think ill of me for posting one of my projects to help this person.

If this is ok with you click Here to download the files zipped.

venkatramasamy Nov 21st, 2007 11:46 PM

Re: how to run command prompt with admin rights
 
hi,
Thank you

venkatramasamy SN

venkatramasamy Nov 23rd, 2007 1:37 AM

Re: how to run command prompt with admin rights
 
hi

to run the command prompt as administrator use the following

C:\Windows\System32\cmd.exe /u:Administrator "%windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f"

With regards

Venkatramasamy SN


All times are GMT -5. The time now is 12:47 PM.

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