I am trying to run the command line application with a service account by shift+r-click ing the Command Prompt application and selecting “Run as different user” from the context menu. I have tried the click text and click OCR options to no avail.
This is my most current attempt which causes the mouse to hover over the correct option and then the mouse turns into the loading symbol until the workflow times out and I get a message that the desktop has been disconnected.
I cannot use the normal click activity because the selector only locks on to the location of the “Run as different user” option which may be different depending on the user.
Any ideas on how I can get command prompt running under a different user?
Also if you need to work in uipath using that option might give you errors, since that will run the application using a different user than uipath, did you try doing this manually to see if it will work in your project?
Yes manually this works and it actually worked fine on my computer using the normal click activity. Unfortunately the selector is nonspecific and only locks onto where the “Run as different user” option is. So for myself it’s the 5th option down but it might be higher or lower on the context menu depending on the user. Which is why I need to use a different activity…
Let’s do one thing
Once after clicking the right click with click activity use SEND HOT KEY activity with key as down without any element chosen for selector
—use n number of send hot key with same key down until it reaches the option we want
—once after reaching use a final send hot key activity with key as enter
If the bot going to be ran in same machine then this option won’t change I hope because I hope it’s windows setting default for any command prompt window
Cheers @arah.yim
It looks like it’s clicking but it does the same thing as with the click text where the mouse turns into the loading ring and the error message I posted above is shown unless you click away, in which case the workflow ends without reporting any error (but also does not open the service account log in popup like it should)