command to elevate a command prompt to an administrative command prompt

I've been doing too much work with Windows XP lately. Now I'm working on troubleshooting a Vista system, and I keep starting a command prompt, executing a few commands, then being told I don't have enough privileges even though I'm logged in as an admin. Is there a command I can use at the command line to turn it into an administrative prompt for those times I forget to right click and "runas admin"


Basically, I'm looking for the equivilent of typing "su" in Linux, although XP and 2000 have taught me that logging in as the admin is like logging in as root. That is no longer the case without disabling User Annoyance Control, which I don't want to do on this system because I don't trust the user I'm fixing it for.


It truly is amazing how everyone is so enthusiastic to tell you 1000 ways to get to an elevated command prompt by closing the one you have and creating a shortcut to runas admniistrator.  You're not a moron, and you know how to do that.


There's no equivalent of 'su' that I have ever been able to find.

From your command prompt, you can type: runas /user:machinename\adminuser cmd but that will still prompt you for an admin password and open a new cmd window.......


That sort of does what you want, and it's faster than messing around with a shortcut.  It still doesn't exactly answer your question, but maybe it is good enough.








17 people found this reply helpful


Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.


Question Info

Last updated September 7, 2021 Views 148,195 Applies to: