Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an administrator command prompt. I'd like to load another command prompt from here without administrator priveledges.

I'm pretty sure its some usage of 'runas' but I can't find the combination


edit: if possible, I would like to avoid entering in a password.

share|improve this question
"RunAs" a non-admin user? – Ƭᴇcʜιᴇ007 May 15 '13 at 21:01
just run cmd from the run box? – Keltari May 15 '13 at 21:08
The goal of my project is to be run as a 'setup environment' that will be on multiple users machines, as part of a batch process. The 'cmd from run' won't do that for me (the cmd is just the first step), I did find the solution that required the account password, but ideally I wouldn't need it if possible. – greggorob64 May 16 '13 at 12:59

If you want a clean solution that doesn't rely on entering a user's password, you can create a task scheduler entry, then trigger it from the command line. Assuming Win 7:

  1. Open Task Scheduler: Control Panel | Administrative Tools | Task Scheduler

  2. Create a new task by clicking on 'Create Task'

  3. Give it a simple name, say 'RunCMD'. Ensure it is set to run as the user you want: enter image description here

  4. Don't give it a trigger. Add an action to run the program you want, cmd.exe: enter image description here

  5. From the command line, activate the task using schtasks.exe /run /tn RunCmd

share|improve this answer
THis is a good potential solution. This is part of a batch file thats going to be run many machines, and it will be tedious if I need to set this up for everyone. – greggorob64 May 16 '13 at 13:01
You can set up a task on a remote machine also using the schtasks tool; if you run schtasks /Create /? you'll get a help description. Microsoft page on it here. This would work if you can provide a run-as user/password which is part of your domain, so that you don't need to know the credentials of the local user in each case. – Geoff May 16 '13 at 16:27
If you do decide to administer the tasks remotely, take note of this too. – Geoff May 16 '13 at 16:28

From "runas" help:
UserName should be in form USER@DOMAIN or DOMAIN\USER
Do not use colon : as separator

share|improve this answer
I wonder if I could combine this with the username enviornment variables, but it would still require a password. – greggorob64 May 16 '13 at 13:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .