cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Manojoshi
Level 2

How to catch Upgrade process

Hi,

I'm using Installshield MSI project & want to catch the Upgrade process before the installation starts Upgrading the package.

I tried using UPGRADEPRODUCTCODE key in my script.
But while installation this is not detected & the installation proceeds with Upgrading.(may be i'm not calling the function at right place)

Let me know any other keys available to check Upgrade??.

Thanks & regards,
Manoj
Labels (1)
0 Kudos
(3) Replies
RobertDickau
Flexera Alumni

That's correct, the older project in a major upgrade can detect that it's being upgraded by checking the UPGRADINGPRODUCTCODE property. (The newer project can check the "action property" from the Upgrade table.) How and where are you reading the value of UPGRADINGPRODUCTCODE? In your script, perhaps display the value of the property in a MessageBox to verify that it's being called?
0 Kudos
Manojoshi
Level 2

Hi,

Thanks.
I'm using this function
MsiGetProperty(ISMSI_HANDLE,"UPGRADINGPRODUCTCODE",szUpgrade,nvBufferSize);
Sprintf(svMsg, "%s",szUpgrade);
MessageBox(svMsg,INFORMATION);

and tried calling in OnBegin, but no success.

I wanted to is Onbegin is the right place to call???

Rgds
Manoj
0 Kudos
RobertDickau
Flexera Alumni

As a sanity check, are you setting nvBufferSize to a large enough size to capture the value of UPGRADINGPRODUCTCODE before calling MsiGetProperty?
0 Kudos