Powershell/CMD Exit Code 3221225794
We have an file transfer automation application where it can run different applications if needed i.e. WinSCP, PSFTP.exe (Putty), Winzip, etc. We use a lot Powershell in some of the file transfer processes. We have one new file transfer process that needs to transfer a large number of files (one file transfer process for each file). What we're finding is the Powershell step is failing. When we view the application logs the following:
Powershell.exe
Process created, PID 11200. Proc count = 101. Single Mode Proc count = 0
12/31/23 22:18:30 Application 'Powershell.exe' complete, ErrorCode: 3221225794
I did some research and found that error is:
Error Code 3221225794
-1073741502 · 0xC0000142 · C0000142 · 3,221,225,794
The application failed to initialize properly.
Usually for interactive apps a user with administrator rights is required. Moreover, the
user must log on at least once to allow Windows to prepare the Windows Station and Desktop.
This error also may indicate that the application has been launched on a Desktop to
which the current user has no access rights. Another less possible cause is that either
gdi32.dll or user32.dll has failed to initialize.`
We have another file transfer process that executes the cmd.exe command that is also failing periodically with the same error. This one doesn't run as much as Powershell.
The file transfer application itself runs under a domain account. There eight services so transfers can continue even of the main console isn't running. Three of the services run under the same domain account while the others run under the Local System account.
Not all processes using Powershell or cmd.exe are failing all the time. Just the one is and periodically.
Since the services are running the application processes and not an individual user as indicated by the explanation of the error, I'm unsure how to resolve this. Has anyone gotten any suggestions?