Automation for command prompt- Using UiPath

Hey @Nivedita2

if you wanna run command prompt with different user profile you have to use runas.

Examples:

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

NOTE: Enter user’s password only when prompted.
NOTE: /profile is not compatible with /netonly.
NOTE: /savecred is not compatible with /smartcard.

Sample: - RunCmdAsDiffUsers.xaml (5.0 KB)

Regards…!!
Aksh

3 Likes