View Full Version : BASIC-MSI: Powershell Custom Action

06-12-2015, 06:31 AM
I am testing the new CA Powershell interface.

The PS1 looks like:

$Value = get-property -name PROP1
set-property -name PROP2 -value $Value
trace-info -LogMessage "I am a PowerShell custom action "
trace-info -LogMessage $Value

The commandlet set,get property works properly. In my example PROP2 gets value of PROP1.
But I can not see in the msi log file any comment made by trace-info.
Can you check it, please?

I am testing this setup on W10-x64 (10130), setup is 32-Bit.
IS2015 works on W10, too.


06-12-2015, 01:59 PM
The trace-info cmdlet is a thin wrapper around MsiProcessMessage and so the usual limitations apply. So for example if you are calling the custom action from a DoAction Control Event this will not work.

If this is not the case can you please provide more information about how and where the action is scheduled. Also you mentioned this was a problem on Windows 10, does this work on other versions of Windows or is 10 the only one you have test on?

06-16-2015, 03:38 AM
Hello John,
Yes, you are right. Calling CA with DoAction you can not write msi logfile directly.

Could you please extend the PowerShell to a new cmdlet for getting installation handle (hMSI) ?