If you have a third-party installation that needs to be run during the Basic MSI installation of your product, and it doesn't already exist as an InstallShield Object, Merge Module, or Prerequisite, you have a couple of choices.  You can create an InstallScript custom action and call LaunchAppAndWait to run the third-party installation program.  However, a better way is to define your own prerequisite and run the third-party installation from that.

To define a prerequisite, go to the Tools menu and select Prerequisite Editor.  When the dialog displays, you will see that InstallShield has given your prerequisite a default name, usually MySetupPrerequisite.prq.  You can go to the File menu and use Save As to save it under a more appealing name.  The name you choose will be what is shown in the Redistributables view of your project.

After the prerequisite has been defined and named, you simply file out each tab.  On the Properties tab, you will notice that InstallShield has assigned a GUID to your prerequisite.  The Conditions tab is where you define the conditions for running the prerequisite.  You can set it to run only on certain Windows versions.  You can also only run it if a certain value is found in the registry.  It doesn't matter how many conditions you define, the prerequisite won't run unless all conditions are met.

On the Files to Include tab, you click the Add button and browse to the third-party installation program you want to run.  Now, this just adds the file to the prerequisite.  On the Application to Run tab, you select application to run.  The list will hold the items that you have added on the Files to Include tab.

The Behavior tab is a very important tab.  You can specify whether you need administrative privileges to run the prerequisite.  Most importantly, you can define what should happen when your prerequisite requires a reboot.  Also, you can specify if the installation should continue to run after the reboot has taken place, in other words, when Windows boots back to the desktop.

There are several choices in the "If the prerequisite appears to need a reboot" list.  You need to study these choices very carefully.  At first they may look like they are poorly defined, but I have found that the InstallShield staff has done a good job of defining all the cases you need to cover with a prerequisite.

One more thing I'll mention is that if you have several prerequisites in your installation, you should right-click in the Redistributables view, and select Set Prerequisite Order.  There you can set the order that the prerequisites should be run.  This is something you will always need to do when your installation uses multiple prerequisites.

 

Deleting Files Not Installed, But Created at Run-Time

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: