PowerShell Script Fixup
The PowerShell Script Fixup enables you to specify PowerShell scripts to be executed before and after the launch of an application. This will be an ideal fixup to apply to an application if you have any first time run tasks to be executed upon launching of an application to the first time and perform any cleanup tasks on closing the application.
To add a PowerShell Script Fixup, perform the following steps:
To add PowerShell Script Fixup:
1. | Select an application in the Applications node, click the Apply button in the MSIX Editor ribbon, and then select PowerShell Script Fixup from the menu. |
Note:You could also select an application, right click, and select Apply PowerShell Script Fixup from the context menu.
The PowerShell Script Fixup Configuration view opens.
2. | Enter the following information: |
Property |
Description |
||||||||||||||||||||||||
Executable |
This property displays the executable that will be invoked when the application is launched. This is a non-editable property. |
||||||||||||||||||||||||
Working Directory |
This property displays the working directory of the application. This is a non-editable property. |
||||||||||||||||||||||||
Script Execution Mode |
Provide the execution mode of the PowerShell script as a part of Start Script or End Script. Select one of the following:
|
||||||||||||||||||||||||
Stop on Start Script Error |
If you select this check box, the Application will not be launched if the Start Script encounters an error. |
||||||||||||||||||||||||
Start Script |
Fill in the following fields to define the start script, a PowerShell script that will be run prior to launching of an application:
Note:Applicable only if you set Wait for Script to Finish option to True. |
||||||||||||||||||||||||
End Script |
Fill in the following fields to define the end script, a PowerShell script that will be run after closing an application:
|
3. | After adding the above fields, click Update button. |
4. | Click Save or Save As in the ribbon for the change to take effect. |
Note:One of the following three properties must to specified to apply a PowerShell Script Fixup: Arguments, Start Script Path, and End Script Path.
Note:Only one PowerShell Script Fixup can be applied to an application.