locked
How to setup shortcut to always run as different user RRS feed

  • Question

  • Hopefully a simple one. I need to run an MMC console as a different username each time. I know I can shirt/right-click and run-as user and this works fine but I can't find anywhere in the shortcut to set the credentials so it always opens under the different user ID. There is nothing under the advanced tab of the shortcut other than run as administrator
    Ian Burnell, London (UK)
    Monday, July 19, 2010 10:40 AM

Answers

All replies

  • Hi,

     

    You can type runas /user:domain\user program.exe when creating a shortcut to run a program as different user.

     

    For more information, please refer to the following link:

     

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

     

    Regards,


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. answer your question. This can be beneficial to other community members reading the thread.
    Wednesday, July 21, 2010 3:15 AM
  • I needed this for the Hyper-V manager under MMC. I had a little bit of trouble with the syntax due to the spaces in the expanded path name. After creating the shortcut I edited the target to be the following:

    C:\Windows\System32\runas.exe /user:domain\username /savecreds "mmc \"%ProgramFiles%\Hyper-V\virtmgmt.msc\""

     

    Works great.

    • Proposed as answer by Zethoun Monday, September 8, 2014 3:47 PM
    Wednesday, December 21, 2011 9:05 PM
  • The magic is the /savecreds parameter, only the first time ask for the password.

    Thanks a lot to all.

    • Proposed as answer by Jim Gould Wednesday, June 28, 2017 12:59 PM
    Thursday, September 5, 2013 1:19 PM
  • Thanks, still working in windows 10, I used it for SQL SERVER

    

    

    Friday, March 10, 2017 5:22 PM
  • Hi

    Got weary of running apps as Diferent user so I once built "Admin Impersonator"
    I've just rebuilt a fresh copy. It is free to download and use.

    Friday, August 4, 2017 11:33 AM
  • how do you setup a shortcut to always run active directory users and computers as another user?
    Friday, October 6, 2017 8:15 PM
  • @thomas

    It apears that the edit settings menu does not popup a settings menu.

    What can i do to get a fix/workaround?

    thx

    Thursday, October 19, 2017 11:22 AM
  • The account in my case needs password but I can't type it in the cmd window that pops up... 
    Wednesday, November 22, 2017 10:27 AM
  • Hopefully a simple one. I need to run an MMC console as a different username each time. I know I can shirt/right-click and run-as user and this works fine but I can't find anywhere in the shortcut to set the credentials so it always opens under the different user ID. There is nothing under the advanced tab of the shortcut other than run as administrator
    Ian Burnell, London (UK)

    Very helpful and complete. Thanks a lot.

    Friday, January 26, 2018 9:38 AM
  • In WIN10 it's /savecred without an "s".
    Thursday, June 7, 2018 12:56 AM
  • The account in my case needs password but I can't type it in the cmd window that pops up... 
    The CMD window can't hide your password, so it just doesn't show what you type. Type your password and hit 'enter' and it will work.
    Wednesday, November 13, 2019 3:58 PM
  • You can type runas /user:domain\user program.exe when creating a shortcut to run a program as different user.

    This may solve the OP's problem, but it doesn't answer his question: "I need to run an MMC console as a different username each time." This solution requires that the same user is used each time - and that username is hard-coded into the command.

    I have a shared computer with a generic logon where I want users to be required to run an application using their own domain credentials each time the application is opened.

    The best solution is for the developers to put in a checkbox for "run as a different user" right next to the "run as administrator" checkbox.
    Tuesday, December 17, 2019 6:39 PM
  • 👍👍👍

    Works exactly as described! THX!!!

    Wednesday, July 29, 2020 11:01 AM
  • I cannot get this to work.  The command window opens - lets me type in my password - then disappears -- flashing some kind of error message for about 10 nanoseconds...  So, I have no hope of troubleshooting.  It does not open the MMC console?  Any way to capture that fleeting error message?
    Friday, August 7, 2020 7:43 PM
  • In case it helps anyone - I stumbled across the solution --- it turns out that the command window being opened also must be opened in privileged mode - it is not enough to provide the credentials to the attempt to open the mmc.  The syntax that worked for me looked like this:

    C:\Windows\System32\runas.exe /savecred /user:MACHINENAME\ADMINACCOUNT "cmd /c start /b mmc PATHTOMSCFILE

    (Swap out your machine name, administrator account and path to whatever file you want to run - for me it was to an .msc file)

    Microsoft makes this stuff SO hard...  They need a lesson in helping us use FEWER clicks - NOT MORE... 

    (Now I need to figure out how to suppress the warning "Do you want to allow this app to make changes to this device?"  Always something...)

    Friday, August 7, 2020 8:16 PM