Job stopped with an unexpected exit code: 0xC000041D

I have a automation with API and Excel read and write. it’s loop for running every half hour.
but after running 4 ~7 hours . there will be stop by an unexpected exit code: 0xC000041D
Can’t find any reason, tried reinstall, not works. have set the only excel scope to not save and save at the end by save excel activity.
Any have idea where I can check it?


The following topic might help you.


Thanks I read the Topic before and tried these steps but still get error


Did you try using excel workbook activities? Instead of excel process scope?

And also for safety did you add any kill process of excel before performing actions on it?


Hi @John_Fu

  • Maybe this problem is caused by the .NET Framework.
  • This error can occur when the .NET Framework is not installed or is not installed correctly.
  • You can try to resolve this issue by repairing or reinstalling the .NET Framework


1 Like

Thank you @Anil_G
In my personal experience, quick disk write to Excel could makes error.
I have many cell writing activity in loop, Even using the Excel process scope with saving option ticked, I will get error. so I think the workbook write would not helps.

1 Like

Thank you @Gokul001 I have a try now, It’s start running now, see if it no error over night.

OKay @John_Fu , If you have no query kindly close thid topic by mark as solved. It will help for other too.


when I back to work and touch the mouse, it suddenly stopped again, but this time running about 16 hours, So I think install .NET Framework helps some how, do you think I should change the Excel scope to workbook activities?
Job stopped with an unexpected exit code: 0xC000041D System.Exception: Job stopped with an unexpected exit code: 0xC000041D

Start Time:
22/03/2023 - 4:50 PM

End Time:
23/03/2023 - 8:20 AM

Hi @John_Fu

You can try with Different Excel scope activity i have mentioned below

  1. Excel Application scope
  2. Workbook activity
  3. Use excel activity
  • Use Kill process activity Process name - "Excel" and along with that use some Delay


After running 3 hours, the error happened again. have no idea to fix.

it’s a very sample process, for regular check API updates by infinity loop. one loop in the automation is running takes about 1 minute only, and delay 30 minutes to another loop.

here is the windows log:
Faulting application name: UiPath.Executor.exe, version:, time stamp: 0x62b2fac5
Faulting module name: KERNELBASE.dll, version: 10.0.22621.1413, time stamp: 0x5129184b
Exception code: 0xc000041d
Fault offset: 0x000000000008fe7c
Faulting process ID: 0x0x4E24
Faulting application start time: 0x0x1D95D52597D0D08
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report ID: 7620c0ad-51ca-4a42-b07f-4378d681edbb
Faulting package full name:
Faulting package-relative application ID:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.