PDA

View Full Version : [InstallScript] Fatal errors



google44
06-08-2006, 02:08 AM
Is it possible to catch all exceptions (fatal errors) and write them to a log file in an InstallScript installation? It will be great for troubleshooting.
I use a script that can log any string in a log file but i cannot figure it out how to log fatal errors.Thank you.

AndrewRich
06-09-2006, 12:28 PM
Is it possible to catch all exceptions (fatal errors) and write them to a log file in an InstallScript installation? It will be great for troubleshooting.
Yes; check the InstallShield Help file under Reference -> InstallShield Language Reference -> Objects and Object Handlers -> Exception Handling. You'll have to insert try..catch..endcatch around code that may cause exceptions.

Christopher Painter
06-09-2006, 01:31 PM
You can also use MsiProcessMessage() to write to the Event Log.