1

Basically the below question, except I would like to launch multiple programs with a single command. Can the syntax be expanded to achieve this? The solution is offered by Coruscate5.

How do I run a program from command prompt as a different user and as an admin

Syntax for a single program is: runas /user:DOMAIN\USER2 /savecred "powershell -c start-process -FilePath "'C:\PATH\TO\YOUR\EXECUTABLE.EXE'" -verb runAs"

What would be the syntax for launching EXECUTABLE.EXE, and EXECUTABLE2.EXE, and EXECUTABLE3.EXE? Note: the same credentials are to be used for all programs.

Edit: Command Prompt will prompt for a password, "Enter the password for DOMAIN\USER2:". The password should preferably need to be entered only once. Alternatively, once per executable (with no other commands required inbetween).

1 Answers1

1

runas /user:username "cmd /c start EXECUTABLE1.EXE & start EXECUTABLE2.EXE"

Daemon-5
  • 241
  • 1
  • 6