Automation is successfull in uipath assistant but fails in orchestrator

I have an automation that stops a windows service using the invoke powershell activity. I have the robot installed in service mode . I enabled the troubleshoot setting to run the automation in assistant and the automation runs successfully as shown in the following screenshot

Now when i run the same automation from orchestrator i get the following error

Any idea why?

It says right in the error - access denied. Whatever robot user you’re using doesn’t have the necessary permissions.

Hi,


I gave the host, assistant and most things admin rights as shown in the screenshot. What else should I do to get it working?

You shouldn’t be messing with that. The issue is the permissions of the Windows account (robot) you’re using to run the automation.

The windows account is an admin account

If you remote into the server using the robot account, can you stop/start the service?

So I had UiPath installed on the server in attended mode and when i ran UiPath assistant as admin and ran the automation from orchestrator it works but when I installed it in service mode it and run from orchestrator it gives this error. It relates to the way it invokes the powershell command. You need to invoke it as an admin which it does in attended mode but not in service mode. If I run the command using -verb runAs to run it as an admin it require me to click yes for the User Account Control pop up which the robot cant do

This may help:

I tried that and it only works for attended mode not service mode

Found this in another thread…

To run UiPath service as Admin, we make below changes in policies:-
Run gpedit.msc to open the Local Group Policy Editor. Expand Computer Configuration, Windows Settings, Security Settings, Local Policies, and Security Options.

  • Set “User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode” to Elevate without prompting.
  • Set “User Account Control: Detect application installations and prompt for elevation” to Disabled.
  • Set “User Account Control: Run all administrators in Admin Approval Mode” to Disabled.
  • Set “User Account Control: Only elevate UIAccess applications that are installed in secure locations” to Disabled

If possible i want to avoid disabling UAC. Is there no workaround to this?



This is the difference between running it from studio and running it in service mode. Studio opens powershell as admin with no UAC but if i run it in service mode it just opens it up as normal even though both have admin rights.