Switch to a different user in MS Windows / DOS

[problem]

You want to switch user from the MS DOS prompt.

[/problem]

[solution]

Use runas

runas /?

[/solution]

[example]

Switch user to other id (Then just run explorer and browse to directory)

runas /user:USERID@xxx c:\winnt\system32\cmd.exe

Where user-id is the USER you wish to change to. For example Admin. xxx represents the hostname of the box or domain.

You can also just use local, if changing to user on the same box, like this:

 C\:Documents and Settings\Admin runas /user:localmarcus "c:\WINDOWS\system32\cmd.exe" Enter the password for localmarcus: Attempting to start c\:WINDOWS\system32\cmd.exe as user "localmarcus" ...

[/example]

If you have found my website useful, please consider buying me a coffee below 😉

Leave a Reply

Your email address will not be published. Required fields are marked *