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).

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 Packaging PowerBench 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 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.