We are having problem with a deferred custom action in c++. We simply want the value for a customactiondata property \'apacheconfpath\' which has a dummy value of test at t
When the deferred custom action requests the data it ask for it via the well known identifier CustomActionData
. You can see that name referenced in the log file at the end of this line:
MSI (s) (80:C4) [20:59:30:210]: Executing op: CustomActionSchedule(Action=AppendToApacheConfigFile,ActionType=1025,Source=BinaryData,Target=AppendToApacheConfigFile,CustomActionData=/apacheconfpath=test;)
To access the data, you'd change your MsiGetProperty
call to look more like:
MsiGetProperty(hInstall, TEXT("CustomActionData"), TEXT(""), &dActionDataLen);
Note: Since you are already using wcautil, I highly recommend using WcaGetProperty()
instead of MsiGetProperty()
. You'll want to check the return code from WcaGetProperty()
and in doing so your custom action will correctly handle user cancels. Otherwise, your custom action could swallow the user's attempt to cancel the install.