[PSADT] Configure deployment scenarios¶
Configure the deployment scenarios of the package.
Important
Precondition: Open the PSAppDeployToolkit package in Packag Wrapper (see Open PSAppDeployToolkit).
Add actions¶
Insert the pre-defined PSAppDeployToolkit actions into the deployment script to customize the deployment scenario.
- Go to the Package Designer tab and select the Actions section (from Pre-install to Post-uninstall) that you need to configure.
To review and edit the whole deployment script in one place, open the Actions > Raw deployment script tab.
Note
The Repair actions section is only available from the PSAppDeployToolkit version 3.8.1.
- To add an action (a pre-defined PSAppDeployToolkit function), place a cursor in the body of the script where you want to insert the action and click Add > Action.
- Select the required action from the list and click Add. Use the search box in the upper right corner to filter the list of actions.
This will insert the first example of action code parsed from the function description in the script file.
Note
The list of available actions is parsed from the open package script files (listed below) and depends on the PSAppDeployToolkit version.
\AppDeployToolkit\AppDeployToolkitMain.ps1
\AppDeployToolkit\AppDeployToolkitExtensions.ps1
To quickly insert this action again, use the Recent list of actions and variables.
- To save the package, select MENU > Save.
Add variables¶
Insert the pre-defined PSAppDeployToolkit variables into the actions of the deployment script.
- Go to the Package Designer tab and select the Actions section (from Pre-install to Post-uninstall) that you need to configure.
To review and edit the whole deployment script in one place, open the Actions > Raw deployment script tab.
Note
The Repair actions section is only available from the PSAppDeployToolkit version 3.8.1.
- To add a variable, place a cursor in the body of the script where you want to insert the variable and click Add > Variable.
- Select the required variable from the list and click Add. Use the search box in the upper right corner to filter the list of variables.
To quickly insert this variable again, use the Recent list of actions and variables.
- To save the package, select MENU > Save.
Validate script¶
Validate the deployment script for structural integrity and general errors.
- Validation is run automatically when opening a package, during editing, and when saving is invoked. To view the validation results, go to the Package Designer > Actions > Raw deployment script tab and take a look at the panel at the bottom. This panel is automatically opened if the script has validation issues.
Click on an error in that panel to jump to the position in script, where this error was found.
- To manually close/open the panel with validation errors, click the button as shown.
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.