Note

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

[MGP][MSIX/APPX settings] Run PowerShell script (PSF)

This fixup allows to run one PowerShell script before a packaged App executable runs and one PowerShell script after the App executable runs to clean up.

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.).

Important

Prerequisites: To enable scripts to run, you need to set the PowerShell execution policy to ‘RemoteSigned’ for both 32-bit and 64-bit PowerShell executable. Command: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

The Package Support Framework (PSF) is an open source kit thatallows to apply runtime fixes to the repackaged Win32 app that fails to run in an MSIX container.

Important

Precondition: Open a project in MSI Generator (see Open MGP project).

  1. Go to the Shortcuts\Apps > MSIX tab.

    image683

  2. Select New PowerShell fixup from the context menu of an app.

    msi-generator-apps-msix-context-menu

  3. Specify a script Type, PowerShell script to run, Arguments and additional parameters of the fixup. Then, click Save.

    Note

    An app can have only two PowerShell scripts: Start and End script.

    msi-generator-apps-msix-psf-powershell




Note

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

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