Note

You are not reading the most recent version of this documentation. See the latest version available.

[MSIX] Run PowerShell end script

This fixup allows to run the PowerShell script after the app executable runs.

When to use: When it is needed to customize the app dynamically to the user’s environment (e.g. configure a database, set up a VPN, mount a shared drive, change registry keys, perform file modifications, etc.).

The fixup will be applied using the Package Support Framework (PSF) - an open source kit that allows applying runtime fixes to the repackaged Win32 app that fails to run in an MSIX container.

Attention

Set the PowerShell execution policy Set-ExecutionPolicy -ExecutionPolicy RemoteSigned for both 32-bit and 64-bit PowerShell executables to enable the script running.

Important

Precondition: Open the MSIX package in MSIX Editor (see Open MSIX/APPX).

  1. First, go to the Package Designer > Files and folders tab and import the PowerShell end file into Package Root of the MSIX/APPX package. For this, follow the instruction [MSIX] Import files.

    msix-editor-files

  2. Then, switch to the Package Designer > Apps and fixups tab.

    msix-editor-apps

  3. Select New fixup > PowerShell end script from the context menu of the application.

    Note

    The application can have only one PowerShell end script.

    msix-editor-apps-context-menu-2

  4. Click Browse and select the imported file of the PowerShell end script. Then, specify the required Script arguments and other script parameters. Then, click Save.

    msix-editor-apps-fixup-powershell-end-dialog




Note

PACE Suite covers the whole range of application packaging tasks - learn more.

Try PACE Suite for free - 21 days no obligations unlimited trial with all functions unlocked.