cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reureu
Level 10

Can a successful prerequisite installation set a property?

Hi,

I am working on a basic MSI project with Installshield 2008, and my setup needs to install the .NET framework.
That is reasonably easy given the prerequisite editor and its various options.

But, my setup must show that the prerequisite was installed successfully by displaying a control on the SetupCompleteSuccess dialog.

Is there any way a prerequisite can set an MSI property on successful installation, so that this property can be used later in the UI or execute sequence?

Or does anybody see a different way to implement this behaviour?

Regards
Labels (1)
0 Kudos
(6) Replies
Gvarma
Level 7

Reureu wrote:
Hi,

I am working on a basic MSI project with Installshield 2008, and my setup needs to install the .NET framework.
That is reasonably easy given the prerequisite editor and its various options.

But, my setup must show that the prerequisite was installed successfully by displaying a control on the SetupCompleteSuccess dialog.

Is there any way a prerequisite can set an MSI property on successful installation, so that this property can be used later in the UI or execute sequence?

Or does anybody see a different way to implement this behaviour?

Regards

I dont think you could implement said behavior using Pre-req editor however what you could do is create your own pre-req installer e.g look on destination machine if .NET is installed, if NOT then initiate the .NET installation by calling LaunchAppAndWait() , then you could read the return value of VAR assigned to LaunchAppAndWait and based on the value assigned proceed futher..

HTH
0 Kudos
Reureu
Level 10

Hi Gvarma,

Thank you for the idea.
It's actually what we implemented before starting to use the prereq editor.

We previously implemented a bootstrap installer (as an InstallScript project) that checked the presence of the .NET framework 2.0 and installed it if required, then starts the main application installer.
That was all fine when installing .NET 2.0 without no service pack.

Now we have decided to define .NET 2.0 SP2 as a prerequisite, and that makes the situation a bit more complicated.

So, I decided to discard this bootstrap installer and use the prereq editor for the following reasons:

  • Windows Installer 3.1 must be installed before starting the .NET installation, which is included in the main application setup.
  • I need to install different versions of the .NET framework depending on the OS version of the target machine. (As you know, .NET 2.0 cannot be installed as such on Windows Vista. On that OS, .NET 3.5 SP1 must be installed to use .NET 2.0 SP2).
  • There is already a multilingual dialog that allows to install the prerequisites.
  • Some versions of the .NET installer require a reboot before the registry actually reflects the presence of the framework.


Using the prerequisites makes my life a whole lot easier.

The problem is, my setup must reboot the target PC after the installation.
And our specs only allow one reboot. So I cannot reboot after installing .NET, continue the installation of the application and perform a final reboot.

So what I want to do is

  • Install .NET and set the ISSCHEDULEREBOOT property on successful installation.
  • Proceed with the installation of the application and set the ISSCHEDULEREBOOT property on successful installation.

The ScheduleReboot custom action will then do the reboot for me.

The problem is: defining .NET as a prerequisite through the prereq editor does not allow to set a property depending on its return code.

Regards
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

For this particular need, I know we added a reboot option that allows you to defer the reboot when it's detected. I think this may have been added in IS 2009... We still have nothing for the general property case, although you could hack something together with helper exes setting registry keys, and system searches for those registry keys.
0 Kudos
Reureu
Level 10

Hi Michael,

Is this deferred reboot after successful prereq installation the one mentioned in that thread? http://community.acresso.com/showthread.php?t=188003
"Note it, fail to resume if the machine is rebooted, and reboot after the installation"

Shame it's not available in IS 2009! 😞

Regards
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Yes, that's the one. Sorry my memory of which version we added it to was incorrect. 😮
0 Kudos
Reureu
Level 10

Shame it's not available in IS 2009!


Hi Michael,

Sorry, I got a little confused with the various versions.

This feature is available in IS 2009 indeed! So you remembered it right 😉
But we are using IS 2008, which does not include this feature.

Regards
0 Kudos