To create a shortcut using the runas command

  1. Right-click the desktop, point to New, and then click Shortcut.

  2. In Type the location of the item, type runas and the command parameters you want to use. See examples in the following table.

    To create a shortcut to

    Type

    Description

    A command prompt with administrator credentials

    runas /user: ComputerName \administrator cmd

    The title bar of this window will indicate the credentials under which it is running.

    Computer Management with administrator credentials

    runas /user: ComputerName \administrator "mmc %windir% \system32\compmgmt.msc"

    The Computer Management window provides no indication of the credentials under which it is running. This could cause confusion if you start two or more Computer Management windows in different security contexts.

    Active Directory Users and Computers with domain administrator credentials (Windows 2000 Server only)

    runas /user: DomainName \administrator "mmc %windir% \system32\dsa.msc"

    The Active Directory Users and Computers window provides no indication of the credentials under which it is running. This could cause confusion if you start two or more Active Directory Users and Computers windows in different security contexts.

    Active Directory Users and Computers in another forest (Windows 2000 Server only)

    runas /netonly /user: DomainName \ UserName "mmc.exe dsa.msc"

    The Active Directory Users and Computers window provides no indication of the credentials under which it is running. This could cause confusion if you start two or more Active Directory Users and Computers windows in different security contexts.

  3. Click Next, type a name for the shortcut, and then click Finish.

Note

  • The shortcut will run with the permissions granted to that user. If the user account is an Administrator or a member of the Administrators group, you can perform administrative tasks.

  • Use of the runas command is not limited to Administrator accounts.

  • If the runas command fails, the Secondary Logon service may not be running.

  • For more information about the runas command, click Related Topics.