Disable check for Application Runtimes while uninstalling

Got a problem you cannot solve? Try here.
Post Reply
Christoph Schneegans
Posts: 55
Joined: Tue Jan 09, 2007 12:20 pm

Disable check for Application Runtimes while uninstalling

Post by Christoph Schneegans »

Hello!

Checks for Application Runtimes are also performed when a product is uninstalled. It seems to me that this can lead to absurd situations.

For example, I might create a setup project that requires the .NET Framework. A potential customer does not have .NET Framework installed on his computer yet, so it is installed before my own setup logic starts. So far, so well. Later, this customer decides that he doesn't like my program, so he wants to uninstall it, along with the .NET Framework. When the customer uses the control panel, it is perfectly valid that he chooses to uninstall .NET Framework first. In that case, my program cannot be _uninstalled_ without _installing_ .NET Framework again. This is really absurd, and I don't want to expose customers to these difficulties.

I think it is possible to develop a custom setup logic and make use e.g. of the MAINTENANCE, NEEDSUPGRADE or REMOVE variables to avoid the situation described above, i.e. to check for Application Runtimes only when installing. On the other hand, I'm new to InstallAware, and I don't want to start with a blank setup. Is it possible to modify the script code generated by a "Default Project" in the desired way?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Yes, you can take care of this if you want. Just wrap the entire prereqs block around an if...else statement, and test for MAINTENANCE being FALSE, running the block only then.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Christoph Schneegans
Posts: 55
Joined: Tue Jan 09, 2007 12:20 pm

Post by Christoph Schneegans »

Thank you, it works. I didn't expect this would be so easy.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

You get the full sources to the setup script, so you can customize anything and everything :)
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Christoph Schneegans
Posts: 55
Joined: Tue Jan 09, 2007 12:20 pm

Post by Christoph Schneegans »

Sure, but I was afraid I had to find an expression such as MAINTENANCE and (REMOVE or MODIFY) and not NEEDSUPGRADE...
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

MAINTENANCE is TRUE even if NEEDSUPGRADE is TRUE, you can see in the script after an auto-uninstall that MAINTENANCE is set back to FALSE. So just trying MAINTENANCE works.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Post Reply