cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Alex_W
Level 6

How to run code before prerequisites starts?

Hi All

I have a few redistributables that run as prerequisites (one being the installing of SQLExpress 2005 SP3). I’d like the check to OS and other target system characteristics before these redistributables run and abort the installation if the things like service pack requirements and other things are not satisfied. So far I haven’t found a way to do this. Any suggestions?

Project type is InstallScript MSI.
Labels (1)
0 Kudos
(4) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Generally I would recommend setting the requirements of the prerequisites themselves to check for these things. Then in your main installation, check for the prerequisites to have been installed, or make similar OS checks there as well. Does that not do what you need?
0 Kudos
Alex_W
Level 6

Hi Michael

The problem I'm having is that I need to test both the OS as well as the service pack installed on the target system. There is an issue with SQLExpress 2005 SP3 that can cause the blue screen of death when it tries to upgrade older versions SQLExpress when on XP SP2 or lower. Who knows when this could be fixed by Microsoft.

With prerequisite conditions I haven't as yet found one registry key or file that allows me to effectively test both the OS and service pack version installed. Because of this I would need to use 2 prerequisite conditions, one to test to OS and one to test the service pack installed. But if condition1 is OS >= XP and condition2 is SP >= 3 this works for XP but will fail with Windows 7.

So far the only reliable solution I've come up with is to check if any version SQLExpress is installed and if so, don't install SQLExpress. This then forces any required clean-up/upgrade of SQLExpress to be something the end user must do manually before continuing the installation. When I find myself heading towards solutions like this, I usually think I must be missing something.

Thanks for any suggestions.

As a side note, how can I put in an enhancement request to add nested prerequisite conditions to prerequisites?
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

I'd just set the minimum/maximum service pack on the relevant OS condition. For example:

Conditions > Add > Setup is running on a specified platform
Select Windows XP
Replace (No Minimum) with 3.
0 Kudos
Alex_W
Level 6

Prefect! Thanks very much!
0 Kudos