One question would be why the program is ending with an exception? Wouldn't it be better to have some redirection into file if you don't need the exception(s).
I would personally disable JIT debugger at registry. From the visual studio docs, when VS is not installed at the computer, which is probably the case.
Disable Just-In-Time debugging from the Windows registry
Just-In-Time debugging may still be enabled even if Visual Studio is no longer installed on your computer. If Visual Studio is no longer installed, you can disable Just-In-Time debugging by editing the Windows registry.
To disable Just-In-Time debugging by editing the registry:
From the Windows Start menu, run the Registry Editor (regedit.exe).
In the Registry Editor window, locate and delete the following registry entries:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebugger
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
If your computer is running a 64-bit operating system, also delete the following registry entries:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\DbgManagedDebugger
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
Make sure not to delete or change any other registry keys.