Right Click context menu selection not working

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?

additional screenshots:

you need to change mouse button to right click…

Yes I shift and right click first to open the context menu and then select the menu option in the next activity.

1 Like

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…

If really this selector:

<wnd app='explorer.exe' cls='#32768' />
<ctrl name='Context' role='popup menu' />
<ctrl automationid='31089' />

is working with the position, then maybe use click image setting the scope to the popup menu…

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

Cheers @arah.yim

Hi Palaniyappan, the n number of down keys would be different for some users is my point. The right click menus will look different for each user.

1 Like

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)

It works for me here, does it work when you run in your studio? only gives the error in unattended robot?

Yes I am working with studio and the bot is going to be attended. Could I possibly see the workflow where this works for you?

here it is: testejs.xaml (8.8 KB)

needs to leave open the folder: C:\Program Files\Internet Explorer

Hi brcorrea thanks for the file, it looks like I cannot see the activities however

they are just click text and click activities, but im using version 19.10.1 of uipath.system.activities (community edition studio).

Not working for me.kindly suggest