Alexey Popkov
Posts: 4
Joined: Sat Apr 03, 2021 3:41 pm

Custom Actions do not work for MSIX package?

Sun Apr 11, 2021 12:12 pm

Hello,

I have a problem with configuring a simple "Launch installed file" Custom Action for an MSIX package. Note that when I build an MSI package, it works well, the problem is only with an MSIX package.

It is very easy to reproduce my problem with the current version of Advanced Installer:
  1. Create a new project using the "MSIX Package" template.
  2. Configure signing using the built-in sign tool and created TestCert (which I installed in accord with the instruction).
  3. Add to the project any EXE file (I used procexp64.exe from the Sysinternals Suite).
  4. Launch the "New Custom Action Wizard", select "Run an EXE file", then "A file installed by this package (installed custom action)", then select your EXE file.
  5. Build your project by the corresponding toolbar button, then run the installer using the "Run" toolbar button. Press "Install" in the installation dialog.
The problem: the custom action isn't executed, and the EXE file isn't run.

Is "Launch installed file" Custom Action not supported by an MSIX package? How can I configure an MSIX package to run a file after finishing the installation?

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Custom Actions do not work for MSIX package?

Wed Apr 14, 2021 5:14 pm

Hello Alexey,

During an MSIX package installation you cannot execute any code, the all known "Custom Actions" support from MSIs does not apply for MSIX packages.

You can see more information about this in the "Differences between MSIX and MSI packages, deployment wise." answer offered by my colleague Bogdan in the "Converting msi to msix : how to pass user inputs in msix format?" StackOverflow thread.

For an app packaged with MSIX, you can execute one PowerShell script when your application launches and one script when the application closes.

Please note, however, that these scripts get executed after the MSIX has been installed, so you should not consider them the equivalent of MSI custom actions.

More information about this can be found in our "MSIX Custom Scripts" article.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”