How do I bring up the Administrator Command Prompt?
I recently upgraded one of my Windows XP running computer to Windows Vista 64bit RC1. Upgradation process went fine without any issue but when I try to adapt my XP defrag script to this new OS it gives me some problem. Exactly, when I try to execute the defrag command, it ends up with an error message saying:
“C:\Windows\System32>defrag c:
This program needs to run with administrative permissions. Use an administrator command prompt and then run the program again.”
Though I am the Administrator of this system, seems like I don’t have complete Admin privileges. So can anyone please tell me how can we elevate the command line privileges to Administrator? Many Thanks.
Re: How do I bring up the Administrator Command Prompt?
You might have seen something called "UAC" in Vista, right? Microsoft has included some new security features in Vista due to which though you have Admin privileges, there are many programs and applications you run only receive "standard user" permissions, unless they automatically ask you for permission. hence what you need to do right-click their icons and select "Run As Administrator" from the content menu to run it with complete Administrator Privileges.
So for running command prompt as an administrator, click Start > type: CMD, press right-ctrl, right-shift, and enter at the same time. This will open Command Prompt as an Administrator.
Re: How do I bring up the Administrator Command Prompt?
That correct. here is the alternate way.
- Start | All Programs | Accessories
- Right click the Command Prompt and choose Run as Administrator.
Re: How do I bring up the Administrator Command Prompt?
Thank you very much for all your helps guys. That seems to be working fine exactly as i wanted to. I appreciate that but still i have a small confusion. Can you guys tell me what if i schedule this cmd file using Task Scheduler?
I mean if it schedule the same will the task scheduler automatically run the program with administrator privileges? Or will i just see a "Run As" prompt when the task executes?
Re: How do I bring up the Administrator Command Prompt?
If you want to add this to a script, then just try out the following:
runas /user:administrator cmd
You can easily replace the cmd with the batch file or vbs script or whatever app
you intend to run with administrative credentials.Let me know if you need anymore help.