3
votes

I'm using WIX to create an MSI which has a custom action to install a clickonce application. I want to deploy the MSI via GPO. The custom action runs fine when I just double click to run the msi, but the custom action does not seems to be running when deployed via GPO. But if you look at the add/remove programs in the control panel you have the product/msi listed there as if it was successfully installed.

To see if custom actions work at all when deploying via GPO I created a simple custom action which just writes a file to c:\temp (existing) folder. Added the custom action to both InstallExecuteSequence and AdminExecuteSequence in before installfinalize step. Tried both deffered execute and immediate execute. It works when you double click the msi to install but not via GPO.

Is it possible to have custom actions when the msi is deployed through GPO? Are there any limitations? Is there anything special that I need to do to get it to work with GPO?

Thanks in advance!

Rukshan

1
Please post sample code detailing your implementation.Christopher Painter

1 Answers

2
votes

I figured it out. The issue was that I hadn't configured the GPO to install the package when the user logs in. After checking that check box in the group policy properties it works.

If you assign the software to users and do not check "install this application at logon", the application will be listed on the user's add/remove programs panel but doesn't really install it. So I was under the impression that it was successfully installed without running the custom action when it really wasn't installed.

Now I have my custom action listed under Install Execute sequence

<InstallExecuteSequence>
  <Custom Before='InstallFinalize' Action='ClickOnceIntallCustomAction' >NOT REMOVE</Custom>
 </InstallExecuteSequence>

And it is set to execute immediately and check on return

<CustomAction Id="ClickOnceIntallCustomAction" BinaryKey="ClickOnceInstallBinary"  Return="check" Execute="immediate" DllEntry="Test" ></CustomAction>