Execution of packages

Packages created with the Packaging PowerBench are executed outside the GUI either interactively in a PowerShell session or automatically via any electronic software distribution system. Of course, it is also possible to distribute and install such packages, for example, using your existing DSM infrastructure (see Execution of packages via Ivanti DSM).

Starting with version 2.0, the PPB also allows you to publish packages in such systems so that you do not have to manually create the packages there and edit their properties. Which systems are available, how to configure the integration between the system(s) and the PPB, and how to publish packages is described in the Publishing packages section.

Calling the executable "Deploy-Application.exe", which is located in the root of the package directory, kicks off the installation. This executable initializes the runtime environment, the App Deployment Toolkit, the PackageDeployment module and then calls "Script.ps1" - the actual script file created in the PPB user interface. 

"Deploy-Application.exe" supports several installation modes that specify the effectively executed installation action (see Background information installation modes). If calling the executable without parameters, the default installation mode is the “Install” mode. This mode checks whether the script is executed in an interactive session. If so, both the computer and the user part are installed. If it is determined that the script was called by a service (running in session 0), only the computer part will be executed, because it is assumed that a service of a software distribution system made the call.

If a package is to be uninstalled, "Deploy-Application.exe" must be called in the "Uninstall" installation mode. The corresponding command line is therefore "Deploy-Application.exe -InstallMode Uninstall". Again, the system checks whether the script is executed in an interactive session and if so, the computer and user parts are uninstalled. If the script runs in session 0, only the uninstallation of the computer part is executed.

The other possible values for the InstallMode parameter and their meaning can be found in the Background information installation modes section.

If the script contains a user part (see Packages with user parts), the Active Setup registry values are created in HKEY_LOCAL_MACHINE in any case. If an interactive execution is detected, as said above, the user part is executed directly. Consequently, the user part must not be started again for the current user via Active Setup. To achieve this, the Active Setup key is also created under HKEY_CURRENT_USER, thus “simulating” that the Active Setup has already been executed for this user.

Note: If the package is in a UNC path when it is executed, loading the runtime module fails if Windows applies the "Internet Zone" security policy when it runs. This is usually the case if you use the IP address or the fully-qualified DNS name to specify the machine with the package directory. To install a package from such a share, you must add the host to the "Local Intranet Zone" in Internet Explorer.


Since version 3.1 of Packaging PowerBench, installation-parameters can be defined in packages. You can override the value of installation parameters when you call the package on the command line, thereby passing custom parameter values to the package. To set the value of one or more installation-parameters when invoked, call Deploy-Application.exe with the command line parameter "-InstallationParameters" and append the value(s) to be set in the format <name of installation parameter>=<value of installation parameter>. When doing so, separate multiple parameters with commas.

Example: deploy-application.exe -InstallationParameters Licensekey="q23bf-j523f-xybw3-qqw54-bw23t", Mode="Silent"

Note: If the value of an installation-parameter contains spaces, problems may occur during evaluation. In this case, enclose all parameter names and the values in double quotes. Please enclose all values with spaces separately in single quotes. 

Example: deploy-application.exe -InstallationParameters "Licensekey=111-1234567, InstallDir='C:\Program Files\MyProgram'"