cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Roman1
Level 9

BASIC-MSI: Powershell Custom Action

Hello,
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.

Thanks.
Labels (1)
0 Kudos

(2) Replies
JohnCresswell
Flexera Alumni

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?
0 Kudos
Roman1
Level 9

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) ?
0 Kudos