Hello,
To get a property simply include a line with the following syntax in your file:
Code: Select all
$propValue = AI_GetMsiProperty YOUR_PROP
Where YOUR_PROP is the property name.
To set a property simply include a line with the following syntax in your file:
Code: Select all
AI_SetMsiProperty YOUR_PROP <VALUE>
Where YOUR_PROP is the property and <VALUE> is the value assigned to it.
Note that setting MSI installer property values works only when the PowerShell custom action has "Immediate" execution time. It does not work if the execution time is set to "When the system is being modified(deferred)". Also, the properties will be updated after the powerShell custom action runs.
Let me know if that helped.
Best regards,
Dan