Add Tracing

If you run into problems while testing a custom installation script, you might consider inserting tracing steps into various points of your script. One possibility is to use echo commands to write out tracing messages to a text file. For example:

@echo beginning pre-install script >>.\trace.txt

.

. <your script commands>

.

@echo exiting pre-install script >>.\trace.txt

@echo beginning post-install script >>.\trace.txt

.

. <your script commands>

.

@echo exiting post-install script >>.\trace.txt

In this example the trace messages are written to the trace.txt file during the installation of the custom update. You can review the text file to pinpoint exactly where your custom script encountered an error. The file will be located in the installation sandbox folder on the target machine. See Review the Sandbox Folder for more information.