[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).
- 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.
- Then, switch to the Package Designer > Apps and fixups tab.
- Select New fixup > PowerShell end script from the context menu of the application.
Note
The application can have only one PowerShell end script.
- 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.
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.