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
- :
- own setup return codes (own error codes returned by custom action)
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
Oct 13, 2009
09:40 AM
own setup return codes (own error codes returned by custom action)
Hello,
I'm using a basic msi project. Installshield pre generates a custum action called ISPreventDowngrade to catch downgrades.
The error code returned by the Setup is 1603 if this action will be executed. This is a common error code if something goes wrong. Is it possible to change the return code of the custom action ISPreventDowngrade to any other code, so that the caller of the setup can decide if there is really a problem with the setup package or if it "only" was an attempt to downgrade?
Basically: is it possible to set a own return code by using custom actions of type 19?
I'm using a basic msi project. Installshield pre generates a custum action called ISPreventDowngrade to catch downgrades.
The error code returned by the Setup is 1603 if this action will be executed. This is a common error code if something goes wrong. Is it possible to change the return code of the custom action ISPreventDowngrade to any other code, so that the caller of the setup can decide if there is really a problem with the setup package or if it "only" was an attempt to downgrade?
Basically: is it possible to set a own return code by using custom actions of type 19?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 13, 2009
01:48 PM
There are very few return codes that you can convince MSI to return (see Custom Action Return Values on MSDN), and most of them have special meanings. However depending on how smart the caller of your installation is, it could easily perform the downgrade prevention check itself - perhaps dynamically by querying the UpgradeCode property of the MSI - and then by using MsiEnumRelatedProducts (or some wrapper thereof).