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: Cannot retrieve a property value during minor upgrade
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
Mar 12, 2010
03:50 AM
Cannot retrieve a property value during minor upgrade
I have a package which does nothing but copies some files onto hard disk. I have created an Install Script custom action which displays a property value. In have set a value 1 for that property ins property tab. During fresh installation, installer is displaying the properly value but during minor upgrade the value is coming null.
I have written this code:
MsiGetProperty(hMSI,"TEST",test,pchValueBuff);
MessageBox("Test property: "+test, INFORMATION);
During fresh installation
Message box is diplaying this--> Test property: 1
During minor upgrade
Message box is diplaying this--> Test property:
Even if I try to get some already defined system property then also I am getting null.
MsiGetProperty(hMSI,"ARPPRODUCTICON",test,pchValueBuff);
MessageBox("ARPPRODUCTICON property: "+test, INFORMATION);
Message box is diplaying this--> ARPPRODUCTICON property:
Does anybody has some idea on this?
I have written this code:
MsiGetProperty(hMSI,"TEST",test,pchValueBuff);
MessageBox("Test property: "+test, INFORMATION);
During fresh installation
Message box is diplaying this--> Test property: 1
During minor upgrade
Message box is diplaying this--> Test property:
Even if I try to get some already defined system property then also I am getting null.
MsiGetProperty(hMSI,"ARPPRODUCTICON",test,pchValueBuff);
MessageBox("ARPPRODUCTICON property: "+test, INFORMATION);
Message box is diplaying this--> ARPPRODUCTICON property:
Does anybody has some idea on this?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Mar 24, 2010
09:56 AM
Are you building a minor upgrade using the same project or by creating a new project.
If you are creating a new project for the minor upgrade then you have to ensure that you include the property into the new project as the database tables do not remain the same for a new project.
Check if the value set for the property is being read by using a if condition.
Sample code
Assuming the value of TEST is set to 1
MsiGetProperty(hMSI,"TEST",svtest,pchValueBuff);
svABC='0';
if(svABC !=svtest)
MessageBox("Test property: "+svtest, INFORMATION);
Ideally you should get a ARPPRODUCTICON.EXE value when the MessageBox("ARPPRODUCTICON property: "+test, INFORMATION); is executed.
If you are creating a new project for the minor upgrade then you have to ensure that you include the property into the new project as the database tables do not remain the same for a new project.
Check if the value set for the property is being read by using a if condition.
Sample code
Assuming the value of TEST is set to 1
MsiGetProperty(hMSI,"TEST",svtest,pchValueBuff);
svABC='0';
if(svABC !=svtest)
MessageBox("Test property: "+svtest, INFORMATION);
Ideally you should get a ARPPRODUCTICON.EXE value when the MessageBox("ARPPRODUCTICON property: "+test, INFORMATION); is executed.