BAT file is denied and won't run when launched from Task Scheduler

When I create a BAT file and run it directly, it works. However, when I run the BAT file using Task Scheduler, it gets denied when it tries to start the robot partway through.

In Task Scheduler:
“Run only when the user is logged on” is ON.
“Run with highest privileges” does not work whether it is ON or OFF.
For “When running the task, use the following user account,” I set the account I currently use; the same thing happens with a different account.
Under “Start a program,” “Program/script” is set to the BAT file’s location and name.
I get the same result whether I enter the BAT file’s location under “Add arguments (optional).”
I’ve configured permissions so the BAT file’s folder and the package folder can be read and written to, but the error remains the same.

Power Automate was easy to use. UiPath has various quirks, but I’d like to use it because it makes fewer recognition errors. However, I’ve already spent a lot of time on this, so if I can’t get it working, I’ll use Power Automate instead.

If there’s a way to overcome this, I’d appreciate your advice.

Hello

Could you share the specific error message you’re seeing?
Also, could you share the command line you’re using to launch the batch file or UiPath?

Thank you for your help.
I asked AI and tried various ways to collect logs and troubleshoot, but I couldn’t get it to work.
(The error details are below; the first is when launched directly, and the second is when launched as a task.)
==== Start 2026/11/18 16:45:36.96 ====
timepro-nx-sub\administrator
CD=C:\Scripts
UiPath=C:\Program Files\UiPathPlatform\Robot\26.10.0-cloud.25715\UiRobot.exe
PACKAGE=C:\ProgramData\UiPath\Packages\次回納品.1.0.12.nupkg
Running UiRobot.exe
USERPROFILE=C:\Users\Administrator
LOCALAPPDATA=C:\Users\Administrator\AppData\Local
APPDATA=C:\Users\Administrator\AppData\Roaming
SESSIONNAME=Console
SESSIONID=
DESKTOP=TIMEPRO-NX-SUB\Administrator
Session Name User Name ID State Type Device
services 0 Disc

console Administrator 1 Active
rdp-tcp 65537 Listen
{}UiRobot ExitCode=0
==== End 2026/11/18 16:51:14.00 ====
==== Start 2026/11/18 16:54:27.64 ====
timepro-nx-sub\administrator
CD=C:\Windows\system32
UiPath=C:\Program Files\UiPathPlatform\Robot\26.10.0-cloud.25715\UiRobot.exe
PACKAGE=C:\ProgramData\UiPath\Packages\次回納品.1.0.12.nupkg
Running UiRobot.exe
USERPROFILE=C:\Users\Administrator
LOCALAPPDATA=C:\Users\Administrator\AppData\Local
APPDATA=C:\Users\Administrator\AppData\Roaming
SESSIONNAME=
SESSIONID=
DESKTOP=TIMEPRO-NX-SUB\Administrator
Session Name User Name ID State Type Device
services 0 Disc
console Administrator 1 Active
7a78855482a04… 65536 Listen
rdp-tcp 65537 Listen
Access is denied.
UiRobot ExitCode=-1
==== End 2026/11/18 16:54:28.73 ====

(Here is the BAT file content.)
@echo off

set “LOG=C:\Scripts\logs\UiPath_Run.log”
set “UiPath=C:\Program Files\UiPathPlatform\Robot\26.10.0-cloud.25715\UiRobot.exe”
set “PACKAGE=C:\ProgramData\UiPath\Packages\次回納品.1.0.11.nupkg”

if not exist “C:\Scripts\logs” mkdir “C:\Scripts\logs”

echo ==== Start %date% %time% ==== >> “%LOG%”
whoami >> “%LOG%”
echo CD=%CD% >> “%LOG%”
echo UiPath=%UiPath% >> “%LOG%”
echo PACKAGE=%PACKAGE% >> “%LOG%”

if not exist “%UiPath%” (
echo ERROR: UiRobot.exeが存在しません >> “%LOG%”
echo Path=%UiPath% >> “%LOG%”
exit /b 11
)

if not exist “%PACKAGE%” (
echo ERROR: パッケージが存在しません >> “%LOG%”
echo Path=%PACKAGE% >> “%LOG%”
exit /b 12
)

echo UiRobot.exeを実行します >> “%LOG%”

echo USERPROFILE=%USERPROFILE% >> “%LOG%”
echo LOCALAPPDATA=%LOCALAPPDATA% >> “%LOG%”
echo APPDATA=%APPDATA% >> “%LOG%”

echo SESSIONNAME=%SESSIONNAME% >> “%LOG%”
echo SESSIONID=%SESSIONID% >> “%LOG%”
echo DESKTOP=%USERDOMAIN%%USERNAME% >> “%LOG%”
query session >> “%LOG%” 2>&1

“%UiPath%” execute --file “%PACKAGE%” >> “%LOG%” 2>&1

set “RESULT=%ERRORLEVEL%”
echo UiRobot ExitCode=%RESULT% >> “%LOG%”
echo ==== End %date% %time% ==== >> “%LOG%”

exit /b %RESULT%

Password Not Provided​

Observed Behavior​

Creating a Robot in Orchestrator without filling in the password field makes it unable to start process execution. Changes made to privileges on the Robot machine can also trigger this issue.

Starting a process from Orchestrator or from the UiPath Assistant displays the following error message:

Executor start process failed, reason System.UnauthorizedAccessException: Access is denied.

Cause A​

The Robot was created without a password.

Solution A​

Edit the Robot as explained here and make sure the following fields are properly filled in:

  • Domain\Username - The username used to connect to the machine on which the Robot is installed. If the user is under a domain, you are required to also specify it in a DOMAIN\UserName format. Use the Whoami command in the Command Prompt to easily find it.
  • Password - The machine’s Windows password. Not required for Attended Robots.

Cause B​

The SCM-managed Robot Service is not running. Find out more about Robot deployment types.

Solution B​

Make sure the Robot Service is running:

  1. Click the Windows Start button, then search for and open Services.msc. The Services window is displayed.
  2. Find the UiPath Robot service and double-click it. The UiPath Robot Properties panel is displayed.
  3. From the Log On tab, select the Local System account option.
  4. Click the Apply button and close the window to confirm the changes. This ensures the Robot Service is running and has all the privileges it needs for executing processes.

Cause C​

The Robot machine no longer has administrator privileges.

Solution C​

Log in to the Robot machine with the same set of credentials with which you created the Robot in Orchestrator. If a process fails to start from the UiPath Assistant, then you need to contact your network administrator to allow admin rights for that user account.


Most probably in Orchestrator, you don’t have an Unattended and Attended robot set for user TIMEPRO-NX-SUB\Administrator. Make sure that you have set the custom windows credentials in Orchestrator for that robot user.

In Assistant make sure that you are connected to Orchestrator using Client IDand also Signed in.

The first log shows Console/Administrator, but the scheduled task may be running in a different or non-interactive session. Even with “Run only when user is logged on” selected, a disconnected RDP session or another account can prevent UiRobot from attaching to the desktop and cause an access-denied failure. Add a scheduled action such as cmd /c whoami > C:\Scripts\logs\task_whoami.txt 2>&1 and also log query session, then compare it with the direct-run log. If the user or session differs, run via UiPath Assistant/Orchestrator in the interactive user session instead of launching UiRobot.exe from Task Scheduler.

Hello,

I tried launching a batch file through Task Scheduler in my environment, and it worked without any issues. (I ran a process that displays a message box.)

How are you calling the batch file from Task Scheduler?