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.

How do I run as a different user on a shortcut in Windows 7?

On Windows XP, I had the ability to mark a shortcut as being run by a different user, so that every time I ran it it would prompt me for a username/password. This let me have two shortcuts for things like SQL Server Management Studio, one for my normal account and one for my domain administrator account which has access to production servers.

I can get to the 'Run as different user' option with Shift + right-click, but I can't see an option anywhere that would let me mark the shortcut as doing this every time.

share|improve this question
add comment

2 Answers

up vote 12 down vote accepted
  1. Right-click > New > Shortcut
  2. For Target, type "runas /user:domain\user program.exe"

I think you can replace "domain" with the computer name if you want it to use a local account.

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/windows_security_runas_shortcut.mspx?mfr=true

The link above is for XP, but I was able to do this in Windows 7. When you double-click the shortcut, it will open a cmd that will prompt you for the user's password. What's interesting is that it doesn't display asterisks (or anything) as you type in the password. However, I did just test it and it is accepting the password you type.

share|improve this answer
    
Not as good as what was in XP IMO but a perfectly acceptable workaround - thanks! –  PhilPursglove Mar 26 '10 at 15:46
add comment

To add to what the above user said:

C:\Windows\System32\runas.exe /user:Domain\UserName "mmc %windir%\system32\dsa.msc"

(This "mmc %windir%\system32\dsa.msc" is for running active directory users and computers as an example)

share|improve this answer
add comment

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.