This website uses cookies. By clicking OK, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Catching the upgrade event with InstallScript MSI ...
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Clue_Clueless
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
Jun 09, 2008
08:35 PM
Catching the upgrade event with InstallScript MSI Project
All,
Basically, what I would like to do is when the user tries to install my software on a machine that has been installed with a previous version of the software, the installer would pop a warning message to tell the user to remove the previous version of the software first before installing this version, and then exit the installation process.
When the user tries to install my software on a machine that has been installed with a previous version of the software, installer would pop a message that tells the user it's gonna perform an upgrade and the user must click on OK in this dialog box to go on. I believe there is a way to intercept this event and insert some code before or maybe after this message?
As the topic of this thread suggests, I'm using InstallScript MSI project.
Thanks a lot, guys.
Basically, what I would like to do is when the user tries to install my software on a machine that has been installed with a previous version of the software, the installer would pop a warning message to tell the user to remove the previous version of the software first before installing this version, and then exit the installation process.
When the user tries to install my software on a machine that has been installed with a previous version of the software, installer would pop a message that tells the user it's gonna perform an upgrade and the user must click on OK in this dialog box to go on. I believe there is a way to intercept this event and insert some code before or maybe after this message?
As the topic of this thread suggests, I'm using InstallScript MSI project.
Thanks a lot, guys.
8 Replies
Kelter
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
Jun 09, 2008
09:04 PM
Re: Catching the upgrade event with InstallScript MSI Project
Use the OnBegin event handler to perform a registry search for a registry entry made during the installation of said earlier product, and upon finding said registry entry, popup a messagebox and abort.
Clue_Clueless
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
Jun 09, 2008
10:22 PM
Re: Catching the upgrade event with InstallScript MSI Project
Kelter,
Thanks for reply.
I did try the method you described. The problem is, when user tries to uninstall the software, onBegin will also be called and the check will resolve to true and the uninstall process will be terminated (by calling abort). User will never be able to uninstall the software.
I think, if I want to do it the way you described, I must be able to detect that the installer is now on "Upgrade Mode" (hope that makes sense) and then perform that check iff under upgrade mode.
Did I make any incorrect assumption here?
Thanks again.
Thanks for reply.
I did try the method you described. The problem is, when user tries to uninstall the software, onBegin will also be called and the check will resolve to true and the uninstall process will be terminated (by calling abort). User will never be able to uninstall the software.
I think, if I want to do it the way you described, I must be able to detect that the installer is now on "Upgrade Mode" (hope that makes sense) and then perform that check iff under upgrade mode.
Did I make any incorrect assumption here?
Thanks again.
Kelter
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
Jun 10, 2008
07:03 AM
Re: Catching the upgrade event with InstallScript MSI Project
Various system properties such as "Installed", "IS_MAJOR_UPGRADE", "IS_MINOR_UPGRADE", "PATCH", "REINSTALL", "ProductState", etc which will give you information about the status of the installation. For example, any time the installation is run in maintenance mode (ie: the product is already installed) the "Installed" property is set.
Keep in mind that MSI is purely table-driven. Even your InstallScript MSI (event driven) project is really table driven, as I understand it. Technically, the same sequence runs each time to run your installation, but conditions on the various actions determine what actually happens during the sequence.
Keep in mind that MSI is purely table-driven. Even your InstallScript MSI (event driven) project is really table driven, as I understand it. Technically, the same sequence runs each time to run your installation, but conditions on the various actions determine what actually happens during the sequence.
Clue_Clueless
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
Jun 11, 2008
08:23 PM
Re: Catching the upgrade event with InstallScript MSI Project
Kelter,
Thanks a lot. Let me give that a try.
Thanks a lot. Let me give that a try.
Clue_Clueless
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
Jun 12, 2008
05:36 AM
Re: Catching the upgrade event with InstallScript MSI Project
tnand53,
Thanks for the reply.
What I'm looking for is a way to perform task only during upgrade, like running a installer when the system has already been installed with a previous version. This seem to be considered as in MAINTENANCE mode...
Thanks anyway.
Thanks for the reply.
What I'm looking for is a way to perform task only during upgrade, like running a installer when the system has already been installed with a previous version. This seem to be considered as in MAINTENANCE mode...
Thanks anyway.
Clue_Clueless
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
Jun 13, 2008
06:47 AM
Re: Catching the upgrade event with InstallScript MSI Project
tnand53,
The problem now is I don't know when the installer is running an upgrade..I mean, I don't know how to check that in the script. I thought there would be a system variable UPGRADE which evaluates to true or 1 when installer is running an upgrade. But it's not there.
Got any good suggestions?
The problem now is I don't know when the installer is running an upgrade..I mean, I don't know how to check that in the script. I thought there would be a system variable UPGRADE which evaluates to true or 1 when installer is running an upgrade. But it's not there.
Got any good suggestions?