This website uses cookies. By clicking Accept, 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
- :
- Re: Catching the upgrade event with InstallScript MSI Project
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- 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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 09, 2008
09:04 PM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 09, 2008
10:22 PM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 10, 2008
07:03 AM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 11, 2008
08:23 PM
Kelter,
Thanks a lot. Let me give that a try.
Thanks a lot. Let me give that a try.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 12, 2008
04:11 AM
if(!MAINTENANCE) then
//This code will only be called during installation and
//not during uninstallation
end
//This code will only be called during installation and
//not during uninstallation
end
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 12, 2008
05:36 AM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 13, 2008
02:52 AM
Hey,
Y dont u put a check in registry. So when it is upgrading,u can check the value from registry and do the necessary stuff...
Y dont u put a check in registry. So when it is upgrading,u can check the value from registry and do the necessary stuff...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 13, 2008
06:47 AM
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?