runas: Command or Program: Run as other user

 

RunAs allows to run certain programs or commands as another user. For example, should a computer be logged in as a normal user and should elevated privileges be required for certain actions, such as installing software, "RunAs" can be used to simply run the installation as an administrator user.

Windows dialog: Run as other user

By holding the Shift key and additionally "right-clicking" on a shortcut, an extended dialog with the option: "Run as other user" can be called:

After entering the login information, the application will be started with another user:

Command Prompt

With the following command in the command prompt, a new cmd window (command prompt) can be started as another user:

runas /user:DomainOrComputername\Username "cmd"

Control in the command prompt: whoami

The command "whoami" in the command prompt, prints as response the currently used user:

c:\temp>whoami
Domain\Username

as system

For example, psexec allows commands to be run as "system", see: Localsystem: use local system account - more rights

positive Bewertung({{pro_count}})
Rate Post:
{{percentage}} % positive
negative Bewertung({{con_count}})

THANK YOU for your review!

Publication: 2022-11-25 from Bernhard | Übersetzung Deutsch |🔔 | Comments:0

Windows 10/11: automatic login | Autologon - Autologin | Windows | Localsystem: use local system account - more rights

Top articles in this section


Windows : create a missing recovery partition

When cloning a large hard disk to a smaller one, I lost the recovery partition. So far not bad, Windows works without recovery partition, but in case of an error the partition helps to get the PC up and running again. To summarize, here's how it works with the recovery partition: As long as the partition is still there, it can be deactivated and written to a file. If the partition gets lost unexpectedly, it can be recovered from the Windows setup media. This post is also available as a video, se...


Windows 11 23H2 (Build: 22631.3296) : show current version

Build means the kernel version of Windows. How current the Windows 10 or Windows 11 installation is, can be seen by the build number used.


the 4 best tools to compare two text files

Anyone who frequently creates scripts or analyzes log files and handles different versions can compare them very quickly with the help of the right editor. 

Questions / Comments


By continuing to browse the site, you agree to our use of cookies. More Details