Packages with user parts

If a package contains commands classified for user execution, this user part needs to run for each user who logs on to the computer. Since the PPB generates packages independent of the distribution system, we cannot rely on the functionality of the DSM Agent, for example, here. 

Therefore, by default, the packages are using a mechanism called "Active Setup" that is available natively in Windows. This mechanism ensures that a configurable command executes for each user who logs on to the system after the corresponding registry entries have been created. When such a package runs, a command line is therefore stored that only installs the user part of such a package for subsequent user logons (see Background information installation modes).

Note: In order for the Active Setup registry entries to be created, the package must be set to contain user parts. To do this, you must set the "Package has user parts" property to "Yes" in the "Settings" section of the package properties. Since most packages do not require a user part, the default value in the supplied templates for this property is "No".


For each package with user parts, a subkey with the package GUID as its name (see package properties) is created below the Active Setup base key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components". Four values are then created in this key:

  • The default value contains the name of the package (as specified during creation and stored in the package properties file)
  • The DWord-value "IsInstalled" is set to 1
  • The string value "StubPath" contains the call to "Deploy-Application.exe" from the package directory with the command line parameter "-InstallMode InstallUserPart"
  • The string value "Version" is set to the version number of the package, as stored in the package properties file (in the form of a four-digit version number separated by comma)


Note: If you want to deploy a package with user parts via Microsoft Intune, make sure that you append the -PersistCache parameter to the command line, i.e. the call to Deploy-Application.exe for installation (see Background info installation modes). If you register such a package using the built-in functionality of the PPB this is done automatically.


Starting with version 3.0 of the Packaging PowerBench, packages that contain a user part can be executed more conveniently, eliminating the need to log off and log back on for a user who is logged on interactively. After installing the computer part via the service of an endpoint management system, the command line stored in Active Setup is automatically called in the context of the logged-in user and thus the user part is directly "post-installed".