views:

25

answers:

1

Hi, I am using a C++ DLL function as a Custom Action in a VS deployment project. I need to set some input data to this custom action. Example: c:\a.dll;c:\b.dll

It seems like I cannot do it. The MsiGetProperty does not return anything (or it fails) inside custom action function. If I have custom action data as: "abcd", then MsiGetProperty gets the data properly.

How do I send the data as I require. Please help.

Thanks, Hilmi.

A: 

Is the custom action scheduled as deferred? Deferred custom actions will not have access to any of the MSI tables and only a few MSI properties.

This article does a decent job explaining how to call a deferred custom action and passing data to it. Although it does not have specifics on how to do this with the VS deployment project.

Also, You may want to consider using WIX instead of the VS Deployment project to create msi packages. The learning curve is a higher but you have much more control over the generated msi.

Aaron Carlson