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
- :
- MsiGetProperty reading CustomActionData return null.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jul 23, 2010
05:44 AM
MsiGetProperty reading CustomActionData return null.
Hi,
While Reading an array of Properties via "CustomActionData" Property through MsiGetProperty in unmanaged code returns 0 as Buffsize.
nStatus=MsiGetProperty (hInstall, TEXT("CustomActionData"), TEXT(""), &BuffSize);
BuffSize returns 0.
Is there smthing with managed and unmanaged code? I am using IS 2009.
Please help with some links which illustrates the way to get array of properties from "CustomActionData" using VC 6.0 unmanaged code.
Regards,
While Reading an array of Properties via "CustomActionData" Property through MsiGetProperty in unmanaged code returns 0 as Buffsize.
nStatus=MsiGetProperty (hInstall, TEXT("CustomActionData"), TEXT(""), &BuffSize);
BuffSize returns 0.
Is there smthing with managed and unmanaged code? I am using IS 2009.
Please help with some links which illustrates the way to get array of properties from "CustomActionData" using VC 6.0 unmanaged code.
Regards,
(6) Replies
‎Jul 26, 2010
01:51 PM
Your code looks fine; did you set a property which matches the name of the deferred custom action running this code? If not, the CustomActionData property will not be set. Similarly if the custom action running this code is not deferred, it will not be set either.
‎Mar 22, 2021
05:41 AM
I Have Same Problem. but i didn't get any solution. Please Help me.
‎Jul 29, 2010
09:41 AM
Hi,
Can we set a property among the list of multiple properties of CustomActionData through MsiSetProperty() ina C++ Custom Action deferred in system context?
I know to get the values of the properties of array of CAD properties using MsiGetProperty() in CA which is deferred in system context.
using,
nStatus=MsiGetProperty (hInstall, TEXT("CustomActionData"), &Buff, &BuffSize);
After parsing Buff, one can easily get the values of Properties contained in CAD.
(CAD = {[Property A];[Property B];[Property C];[Property D];[Property E]})
Values of Property A, Property B, Property C etc can be easily obtained.
But,
Wht if i want to set a particular Property say [Property D] or both [Property D;Property E]
Isit possible in C++ custom action deferred in system context??
Please explain the way to acheive this.
Regards,
Can we set a property among the list of multiple properties of CustomActionData through MsiSetProperty() ina C++ Custom Action deferred in system context?
I know to get the values of the properties of array of CAD properties using MsiGetProperty() in CA which is deferred in system context.
using,
nStatus=MsiGetProperty (hInstall, TEXT("CustomActionData"), &Buff, &BuffSize);
After parsing Buff, one can easily get the values of Properties contained in CAD.
(CAD = {[Property A];[Property B];[Property C];[Property D];[Property E]})
Values of Property A, Property B, Property C etc can be easily obtained.
But,
Wht if i want to set a particular Property say [Property D] or both [Property D;Property E]
Isit possible in C++ custom action deferred in system context??
Please explain the way to acheive this.
Regards,
‎Jul 29, 2010
11:16 AM
If I understand your question correctly, you're asking how you can set a property in a deferred custom action such that another custom action (probably also deferred) can read it. The short answer is you can't. Each deferred custom action runs in its own execution context, and you can only pass information into it via CustomActionData (and a few other select properties), and can only return an error code.
The long answer is the information you pass in can identify a shared location (think temporary file name) to read or write some information. Then this information can thus be shared among multiple actions. I'm uncertain whether this works fully in every scenario that Windows Installer supports, and there is some risk of privilege escalation, but it works in all the common ones.
The long answer is the information you pass in can identify a shared location (think temporary file name) to read or write some information. Then this information can thus be shared among multiple actions. I'm uncertain whether this works fully in every scenario that Windows Installer supports, and there is some risk of privilege escalation, but it works in all the common ones.
‎Jul 29, 2010
12:15 PM
Hi Micheal,
Thanks for your reply.
Your understanding about my question is right. The set value of that Property is used by other deferred CA down in the sequence.
Allright, Probably i may need to write/read the values at some common location say temp file.
Is not there is any other way in case if this does not worked??
Regards,
- Manisha
Thanks for your reply.
Your understanding about my question is right. The set value of that Property is used by other deferred CA down in the sequence.
Allright, Probably i may need to write/read the values at some common location say temp file.
Is not there is any other way in case if this does not worked??
Regards,
- Manisha