When upgrading to Windows, many a time Enterprise IT admins use Custom Script that can set up few things right along with the installation. These scrips can install software, apply group policy, and so on. If you receive any of the error codes 0XC19001e2, 0XC19001e3, 0XC19001e4, and 0XC19001e5, then there is a problem with your script.




0XC19001e2 MOSETUP_E_PREINSTALL_SCRIPT_FAILED A preinstall script failed to execute or returned an error.
0XC19001e3 MOSETUP_E_PRECOMMIT_SCRIPT_FAILED A pre-commit script failed to execute or returned an error.
0XC19001e4 MOSETUP_E_FAILURE_SCRIPT_FAILED A failure script failed to execute or returned an error.
0XC19001e5 MOSETUP_E_SCRIPT_TIMEOUT A script exceeded the timeout limit.

The error codes are self explianatory, depending on the error code, you need to check part of the script depending on the error code. Scripts can have two major stages. First is the pre-install part where it checks for pre-requisites, while pre-commit is just before everything is finalized.

You can learn more about Windows Setup Scripts here.