Note
You are not reading the most recent version of this documentation. See the latest version available.
[PSADT] Configure deployment scenarios¶
Configure the deployment scenarios of the package.
Important
Precondition: Open the PSAppDeployToolkit package in Packag Wrapper (see Open PSAppDeployToolkit).
Add commands¶
Insert the pre-defined PSAppDeployToolkit or common PowerShell commands into the deployment script to customize the deployment scenario.
- Go to the Package Designer tab and select the Actions section (e.g. Pre-install, Post-uninstall) that you need to configure.
Note
The Repair section is only available from the PSAppDeployToolkit version 3.8.1.
- To add a new command (a pre-defined/user-defiend PSAppDeployToolkit or a common PowerShell function), place a cursor in the body of the script where you want to insert it.
- If you know the command name, start typing it and the IntelliSense will help you to complete the command name, specify its parameters and variables.
- Alternatively, to view the list of available commands or find a specific one, click Add > Command.
Then select the required command from the list in the dialog box and click Add. This will insert the example code of the command, parsed from the function description. If there are multiple examples, you will be asked which one to insert.
The Command source presents a list of available PowerShell modules. If you can’t find the PS module you want, wait a moment while it re-reads the available modules and their commands. Use the search box in the upper right corner to filter the list of commands.
Note
The list of available PSADT commands is parsed from the opened package (files listed below) and depends on the PSAppDeployToolkit version.
\AppDeployToolkit\AppDeployToolkitMain.ps1
\AppDeployToolkit\AppDeployToolkitExtensions.ps1
To quickly insert this command 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 (e.g. Pre-install, Post-uninstall) that you need to configure.
Note
The Repair 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 it.
- If you know the variable name, start typing it and the IntelliSense will help you to complete the name.
- Alternatively, to view the list of variables or find a specific one, 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 all 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.