To create a shortcut using the runas command
January 30 2008
To create a shortcut using the runas command
Right-click the desktop, point to New, and then click Shortcut.
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. |
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.