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

How can you run an application as another user in Windows 7? The only catch is that I don't want to have to hold down the shift key, right click on the application and choose Run as different user. I need it to automatically login using the login credentials I specify.

share|improve this question
DO NOT DO THIS! There's a huge security flaw with "runas /savecred ...", as I described in my answer here: (and include a working solution to the problem of running a program with elevated rights). – C. M. Apr 20 '15 at 17:27
up vote 5 down vote accepted
  1. Create a shortcut to your executable.
  2. Modify the "Target" under the shortcut's properties to:

    runas /user:DOMAIN\USERNAME "path to executable"

Then, just use the shortcut when you want to run the program.

share|improve this answer
If you need to pass any arguments to the target executable, make sure to include them in within the quotation marks. – Sam Oct 1 '13 at 6:11
what about the password? – Moslem Ben Dhaou Oct 28 '13 at 10:20

A script can be run as a task, but if we have to run an interactive application as another user, then creating a task does not work (as mentioned in

You will have to necessarily tick the box "Run whether user is logged on or not" and if you do that, the task will not show the user interface of the application.

The other approach of using runas with /savecred also has its own problems, as explained in that thread.

Dont know whether there is a solution for this.

share|improve this answer

Create a shortcut to your executable. Modify the "Target" under the shortcut's properties to:

runas /savecred /user:DOMAIN\USERNAME "path to executable"

  • Right click then Run As Administrator the first time you use the shortcut, enter your password in the cmd prompt and press enter.
  • Clicking the icon will then run as the user
share|improve this answer

You must log in to answer this question.

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