Windows powershell jobs fail to start with CreateProcess error=2 cannot find the file
search cancel

Windows powershell jobs fail to start with CreateProcess error=2 cannot find the file

book

Article ID: 416286

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

After upgrading from v21 to v24 the Windows job with Powershell as custom interpreter fail with FAULT_OTHER and message:

U02001049 Job 'JOBS.WIN.TEST1', with Run-Id '1138017 could not be started', cause: 'Cannot run program "powershell.exe -NonInteractive -ExecutionPolicy bypass -NoLogo -file" (in directory "D:\"): CreateProcess error=2, The system cannot find the file specified'.

This occurs in case the parameter logon=0 is set in the agent ini file and the ANONYMOUS_JOB=Y in the UC_EX_HOSTCHAR of the related agent.

However, if the setting useJobObject=1  is set in the agent ini, the issue does not occur.

Environment

Agent Windows Java 24.x and 21.x

Cause

DE176342

Resolution

Update to a fix version listed below or a newer version if available.

Fix version:
Component(s): Agent Windows

Automation.Engine 24.4.2 HF3 - Planned release mid November 2025
Automation.Engine 24.4.3 - Planned release December 2025

Additional Information

Public Title: Windows jobs fail to start

Public Description: Windows Agent do not populate environment variables to Jobs if it's started from Service-Manager with logon=0 + ANONYMOUS_JOB=Y