[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 that allows to apply runtime fixes to the repackaged Win32 app that fails to run in an MSIX container.
Important
Precondition: Open a project in Package Generator (see Open MGP project).
- Go to the Shortcuts\Apps > MSIX tab.
- Select New PowerShell fixup from the context menu of an app.
- 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.
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.