Using custom Package templates
Using custom Package templates
By default, the Package Subscription Service uses the same import templates as the manual import via the GUI of the Packaging PowerBench. These templates are located in the "Import Templates" subdirectory of the PPB installation directory.
Sometimes there is a requirement to supplement the supplied templates with your own templates. This may be the case, for example, if you use differently designed templates and do not want to overwrite the supplied templates, or if a specific application is to receive an individual template. Possible use cases are, for example, templates in which a shortcut created by the default installation on the desktop is to be deleted or a template that deactivates or deletes the automatically installed update service of an application.
To define user-defined import templates, create a new directory below the "Import Templates" directory with a name starting with "Custom.". The template files "Package.xml", "Script.ps1" and "Template.xml" are then required within this directory. The display name of the template, i.e. the name that is displayed during manual import in the wizard or when subscribing to a package in the package template for the import, is defined in the Template.xml in the <Name> node.
As a rule, you will not need to adapt the Package.xml file, but adaptations are of course possible and will be included in the package when you create a package based on this template.
Finally, customize the Script.ps1 to your requirements. Of course, you can simply copy a Script.ps1 from a package created with the PPB that you want to use as a template and do not have to edit it manually with a text- or PowerShell editor.
Finally, it is possible to copy any files that are to be included in the packages based on this template into the template's Files directory.
The following screenshots show the selection option using the example of a user-defined import template for the KeepassXC application for both manual import and...
as well as when subscribing to the application via the Package Subscription Service: