MsiEvaluateCondition
Posted 09 November 2001 - 21:03
Posted 13 November 2001 - 16:20
You can pass the required information in with CustomActionData
Posted 15 November 2001 - 21:14
Posted 15 November 2001 - 23:05
The correct way is for your immediate actions to define a property with the same name as your deferred custom action then the custom action can read this property with MsiGetPropery(hMsi, "CustomActionData", pString, &Length);
Posted 16 November 2001 - 15:00
Thanks much for your advice on this. I'm just trying to understand everything I can. I would much rather do it the "correct" way.
Posted 16 November 2001 - 15:41
Since you are still learning about deffered custom actions I will point out another issue beginners often miss out (I did). I am not implying you do not know this already. If the installation fails later your CA will be called again to undo the changes it made. So you must at least prevent the CA from running again or ideally reverse your action.
A deferred CA should have the broad structure
UINT _stdcall GreatStuff(MSIHANDLE hInstaller)
{
if (MsiGetMode(hInstaller, MSIRUNMODE_ROLLBACK))
{
// Installation has failed
// Add code to undo what the CA did here
}
else
{
// Add code to perform the CA here
}
return ERROR_SUCCESS;
}
Posted 16 November 2001 - 17:37
see MSI docs
Windows Installer
Custom Actions
Using Custom Actions
Obtaining Context Information for Deferred Execution Custom Actions