Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Thanks!

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

share|improve this question
1  
"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

2 Answers 2

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.