If you are working in an InstallScript or InstallScript MSI project, then you should remember to study what the default event handlers are doing.

Let’s say you have created a new project, and have done some work in a couple of the event handlers. All the other event handlers are not present in your script (InstallShield is calling them behind the scenes). If you are confused how a certain part of the installation is working (that you have not yet touched or changed), then you should add the appropriate event handler and check it out.

For example, if you have everything working properly during an initial installation, and you now need to work in the maintenance installation, you may wonder how to go about this. The first thing would be to go to the top of the InstallScript view and add the appropriate event handlers to the script (if they have not already been added to the script). In this case, you would want to add OnMaintUIBefore and OnMaintUIAfter.

After doing this, you can study what is there by default in these handlers and then better understand where to add your own code.

Another example is where you don’t have a new installation, but rather have one you inherited from someone else. You are not clear what calls were placed in the script by InstallShield, and what were placed by the previous installation developer. In this case, I would create a new project in a new folder, add the appropriate event handlers I want to study, then build the project, and step through in the debugger.

This should all sound perfectly logically, but I even forget to do this sometimes.

In closing, if you are not clear about the default behavior of any installation that has a script, add and/or examine the default event handlers. You will gain a lot of clarity and will even learn some things.

 

Common Questions About Standard Patches

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Security Code: