runas command

runas is a command in the Microsoft Windows line of operating systems that allows a user to run specific tools and programs under a different username to the one that was used to logon to a computer interactively. It is similar to the Unix command sudo, but uses a completely separate account rather than adding privileges to an existing one.

C:\Documents and Settings\admin>runas

RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]
/user:<UserName> program

RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]
/smartcard [/user:<UserName>] program

/noprofile        specifies that the user’s profile should not be loaded.
This causes the application to load more quickly, but
can cause some applications to malfunction.
/profile          specifies that the user’s profile should be loaded.
This is the default.
/env              to use current environment instead of user’s.
/netonly          use if the credentials specified are for remote
access only.
/savecred         to use credentials previously saved by the user.
This option is not available on Windows XP Home Edition
and will be ignored.
/smartcard        use if the credentials are to be supplied from a
/user             <UserName> should be in form USER@DOMAIN or DOMAIN\USER
program         command line for EXE.  See below for examples

> runas /noprofile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin “mmc %windir%\system32\dsa.msc”
> runas /env / “notepad \”my file.txt\””

NOTE:  Enter user’s password only when prompted.
NOTE:  USER@DOMAIN is not compatible with /netonly.
NOTE:  /profile is not compatible with /netonly.

runas /profile /env /user:domain\administrator “mmc %windir%\system32\dsa.msc”


Posted on September 2, 2011, in Uncategorized, Windows. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: