Indiana University
University Information Technology Services
  
What are archived documents?
Login>>
Login

Login is for authorized groups (e.g., UITS, OVPIT, and TCC) that need access to specialized Knowledge Base documents. Otherwise, simply use the Knowledge Base without logging in.

Close

In Windows, how do I run an application as an alternate user?

Windows 7, Vista, and XP offer a Secondary Logon service (also known as "run as") that lets you run programs as different users. This tool is helpful in applying the principle of least privilege. For example, you can log into your computer as a normal user, and when you need to have administrative privileges to carry out a task, you can launch that program using the Secondary Logon service to select an administrative account.

There are a couple of ways you can use the Secondary Logon service:

Run as...

In Windows 7 and Vista, by default, the Run as... option is not available. However, if you right-click an application, you can choose the Run as administrator option, which is typically followed by a User Account Control (UAC) prompt asking you to continue.

You can also download an external shell add-on that adds the Run as... feature to Vista; see ShellRunas.

In Windows XP, navigate to the program you'd like to launch with different privileges. Click it once to select it, and then hold down the Shift key and right-click the program. You'll see a contextual menu from which you can select Run as... , and then choose a different account.

Run

In Windows 7 and Vista, from the Start menu, enter run in the "Start Search" field. When the Run icon appears, click it. In XP, from the Start menu, select Run... .

Enter the following command:

runas /user:username cmd

Replace username with the name of the account you want to use. You can replace cmd with any command you'd like to run (if it contains spaces between characters, enclose it in double quotes). Click OK. When prompted, enter the password for the account you've chosen. This method will start a new command shell in a new session, from which you can launch programs.

For more information about the Windows Secondary Logon service, see articles 225035 and 305780 at the Microsoft Help and Support web site.

Search Microsoft Help and Support.

This is document amsq in domain all.
Last modified on April 29, 2011.

Comments/Questions/Corrections

Use this form to offer suggestions, corrections, and additions to the Knowledge Base. We welcome your input!

If you are affiliated with Indiana University and would like assistance with a specific computing problem, please use the Ask a Consultant form, or contact your campus Support Center.

Contact Information

Note: We will reply to your comment at this address. If your message concerns a problem receiving email, please enter an alternate email address.