On Windows, program faults can cause an modal window to appear regarding reporting the issue to Microsoft. This window stops automated scripts from further progress. This is a problem for long-running programs or scripts that call other programs, perhaps on a Task Schedule.
Disable Windows Reporting modal windows on Windows Pro and non-Pro by simply opening “services.msc” and disable “Windows Error Reporting Service”.
Alternatively, for Windows Pro:
Press ⊞+r and type
Go to Computer Configuration → Administrative Templates → Windows Components → Windows Error Reporting and configure as desired.