PDA

View Full Version : Best way to handle install dir modifications in InstallShield 11



paulcShipCon
11-08-2005, 12:08 PM
Hi,

I have been trying to solve a problem with our installer for a while now - basically what it comes down to is that our installer for our old release was created using InstallShield 10 - in this installer we had a set of vbscript custom actions which read the installation directory properties for our application and used them to modify some preference files needed to load the application. (ie. using Session.Property("INSTALLDIR"))

I've been porting our install over to installshield 11 as well as making changes for our new product and I have run into the following problem.

The vbscript custom actions will not run in the appropriate place in the install sequence unless they are set to 'deffered execution' (in installshield 10 they ran at the correct point in the sequence even if they were set to immediate execution). What this means is that the vbscript actions because they are now deferred cannot see the property values for the installation directory (ie. "INSTALLDIR").

I am trying to avoid using any installscript in the installation and so I have been looking at using a c++ dll to handle this part of the functionality.

What I am wondering is if anyone else out there has run into this type of problem and may have a solution that will allow me to avoid having to rewrite all the vbscript ca's in c++?

Is there a way to get the property data in the deferred vbscript custom actions? - I read that you could use a property called CustomActionData or something similar is that true?

Any advice is appreciated.

DMorisseau
11-08-2005, 01:37 PM
In your vbscript custom action, are you using Property("INSTALLDIR") as opposed to Session.Property("INSTALLDIR")?

I'm not the most proficient vbscripter in the world, so I've tended to write InstallScript custom actions that allow me to use MsiGetProperty to read properties and MsiSetProperty to set them at runtime.