Automic Workload Automation

 View Only

 Getting error -1073741502 when trying to run batch file on windows server

Allen Sabernick's profile image
Allen Sabernick posted Feb 06, 2025 08:33 AM

I have a Windows server that we recently upgraded the agent from 21.0.6 to 24.3.0.  The UC4 service runs as a service account user and the user is not an administrator.  From AE, we run a job that runs a simple batch file (contents of which don't seem to matter).  When we run the job, in the agent logs, the batch file never gets run and I see the message "ended with return code '-1073741502'."

If I add the service account to the local admin group, the job runs and the batch file executes as expected.  In version 21.0.6, the job would run fine without the user needing to be in the local admin group.  I know there were a lot of changes (aka Java), but I have added the user to all the recommended policy objects as per https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/24.3/Automic%20Automation%20Guides/Content/InstallAgents/InstallAgentWindows_Java.htm?tocpath=Installing%7CInstalling%20the%20Agents%7CInstalling%20On-Premises%20Agents%20Manually%7CInstalling%20the%20Agent%20for%20Windows%20(Java)%7C_____0

Any ideas why the batch file is not running unless the service account is in the local admin group?  Thanks

Michael Dolinek's profile image
Broadcom Employee Michael Dolinek

Hi @Allen Sabernick

the error code -1073741502 is 0xC000 0142, which can be read as "DLL Initialization Failed".

Looks like the OS-user, which runs the Agent cannot create a session for the OS-user specified in the job.

Questions:

  • Is this a Windows installation without GUI (aka Server Core)?
  • Does it work after you manually logon/logoff on that server using the OS-user specified in the job?

Michael

TEREASE MCCORMICK's profile image
TEREASE MCCORMICK

Did you ever get this figured out? I am having the same issue - 

Fred Shindle's profile image
Fred Shindle

I am not answering the issue at hand but I am posting to the 'answer' section as I can not 'reply' or add to.  We are having the same issue listed here.  Ben Baez has also posted separate / similar thread.  Hopefully support is working on.

Allen Sabernick's profile image
Allen Sabernick

Yes, we finally found the answer.  On the Windows settings page, there is an option called View Job on Desktop.   This needs to be set to Do Not Show, otherwise, it tries to display something running as a service to the desktop which only admins can do.  From what the tech told me, this is a legacy option that they didn't even think was used anymore.

BEN BAEZ's profile image
BEN BAEZ

Sadly this isnt the answer for us as our "View Job on Desktop" setting is already set to "Do Not Show". I will keep digging on this

TEREASE MCCORMICK's profile image
TEREASE MCCORMICK

I found that setting the 'view job on desktop' to Maximized solved the problem for me.