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: why does msigetporty fail?
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
‎Feb 21, 2015
11:30 AM
why does msigetporty fail?
I set a property via custom action property successfully, and the new value shows up in dialogs like InstallWelcome. However, msgetproperty fails to retrieve the value and even the "MessageBoxEx" shows the previous value of the property.
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 24, 2015
02:40 PM
Hi Turbo,
I do not know the details of your project but if the property is used in a deferred custom action, then I know that calling MSIGetProperty("MYGREATPROPERTY") will not return the data. It is because deferred custom actions only have access to a handful of properties, as you might recall.
IF this is a deferred custom action, then try creating a property that sets the value to a property that is the same name as your custom action. For example, let's say that your custom action is named "MyDeferred_Function". Then you would set the name of the property to MyDeferred_Function and assign it the value you want for "MYGREATPROPERTY".
Then in your code, call MSIGetProperty("CustomActionData"), this will now contain the value of MyDeferred_Function.
Now let's say this is the case, AND you need to access multiple properties. The only solution is to string the values together with a delimiter separator. Then in your custom action split the data into its individual parts.
If your custom action is not a deferred custom action then I would just double check to make sure your property is all upper case characters because only public properties can be modified at runtime.
Also create a MSI log file to see if it validates that a property is being set correctly. My guess is yes since the UI can display the value correctly, which is why I was thinking that your action maybe deferred.
I do not know the details of your project but if the property is used in a deferred custom action, then I know that calling MSIGetProperty("MYGREATPROPERTY") will not return the data. It is because deferred custom actions only have access to a handful of properties, as you might recall.
IF this is a deferred custom action, then try creating a property that sets the value to a property that is the same name as your custom action. For example, let's say that your custom action is named "MyDeferred_Function". Then you would set the name of the property to MyDeferred_Function and assign it the value you want for "MYGREATPROPERTY".
Then in your code, call MSIGetProperty("CustomActionData"), this will now contain the value of MyDeferred_Function.
Now let's say this is the case, AND you need to access multiple properties. The only solution is to string the values together with a delimiter separator. Then in your custom action split the data into its individual parts.
If your custom action is not a deferred custom action then I would just double check to make sure your property is all upper case characters because only public properties can be modified at runtime.
Also create a MSI log file to see if it validates that a property is being set correctly. My guess is yes since the UI can display the value correctly, which is why I was thinking that your action maybe deferred.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 26, 2015
10:38 AM
That is what the problem was.
I wish there was a single API that we could just call with a single call, instead of 2. Ir seems to me that I have to do this for each property. It would be nice to just initialize all properties in a single call, and then use them later in deferred CA.
Thanks
I wish there was a single API that we could just call with a single call, instead of 2. Ir seems to me that I have to do this for each property. It would be nice to just initialize all properties in a single call, and then use them later in deferred CA.
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 26, 2015
11:46 AM
Hi Turbo,
Yes, I agree. If I was dealing with deferred custom actions all of the time then this would be less of an issue, but having different rules for different segments of an installer just makes a complex process more error prone as you discovered.
I know I have been bitten by this problem before and probably will again.
😄
Yes, I agree. If I was dealing with deferred custom actions all of the time then this would be less of an issue, but having different rules for different segments of an installer just makes a complex process more error prone as you discovered.
I know I have been bitten by this problem before and probably will again.
😄