Package Properties
Package Properties
In the first version of the Packaging PowerBench you had to set the properties of the packages manually in the package properties file "Package.xml" located in the package directory. From version 2.0 on, this is possible in the graphical user interface, so the following information is basically for your information only. Of course you can still edit the properties in the package properties file, but this is not recommended.
The following properties are currently available in the package properties file:
- ID
Unique GUID that identifies the package. Automatically generated and used to log execution and, if necessary, for the Active Setup registry entries. - Name
Package name specified when the package is created. It is also displayed in the tabs of the package files being edited and in the title bar of the window. - Displayname
Optional: Localizable display name of the package. - Description
Optional: Localizable description of the package. - Vendor
Optional: Manufacturer of the software that installs the package. - Version
Optional: Version of the software that installs the package. - DisplayVersion
Optional: Displayversion of the software that installs the package. - Homepage
Optional: Link to the homepage of the software that installs the package. - License
Optional: License of the software that installs the package. - LicenseURL
Optional: Link to the license agreement of the software that installs the package. - Revision
Integer value of the revision of the package. When revising a package and redistributing to existing clients, this revision number is increased. - RevisionComment
Optional: Comment for the current package revision - Architecture
Optional: Specifies whether the packet is 32-bit or 64-bit. Is automatically entered with the value of the environment variable "Processor_Architecture". - Language
Optional: Language of the software that installs the package. Is automatically entered with the currently set language of the Packaging PowerBench. - ScriptDate
Optional: Specifies the date and time the package was created. Is automatically entered with the current system time. - ScriptAuthor
Optional: Specifies the author of the package. Is automatically entered with the value of the environment variable "Username". - HasUserPart
Specifies whether the package contains a user part. If set to 1 or True, Active Setup registry entries are created (see Packages with user parts). Default value for new packages is 0. - SkipImmediateUserPartExecution
Optional: Defines whether the user part for the logged-in user is executed directly after the machine part or not. - ShowFinalErrorMessage
If this setting is activated, a corresponding message is displayed in the event of an error. By default, the message is suppressed.
Starting with version 4.1 of the Packaging PowerBench, it is possible to create user-defined package properties. This is used, among other things, to create the option of customizing the registry path for logging package executions. In principle, there are several ways in which you can define such individual properties:
If you only want packages of a certain type to have a certain property, you can proceed as follows:
- Open the Package.xml file in the template directory assigned to the respective package type.
- Add a new <Property> sub-node there in the <Properties> node.
- Enter the name, type if required and the default value.
- Save the file and open the Packaging PowerBench.
If you subsequently create a new package based on this template, the new package inherits the property of the template.
If you want to create a new custom property for all package types, regardless of the template used, you can use the PackagingPowerBench.exe.config configuration file. Proceed as follows:
- Open the configuration file PackagingPowerBench.exe.config in the PPB installation directory with a text editor of your choice..
- Find the setting NewPackagesDefaultProperties.
- Type the new property/properties you want to create in the value of the setting. Use the format <property name>=<value>. If you want to define multiple properties, separate them with commas.
For example: You could enter a value such as InternalAppID= to define the InternalAppID property and not specify a default value. - For the changes to take effect, save the configuration file and then open Packaging PowerBench.
Note: Regardless of whether you define the properties in the Package.xml of a template or globally in the configuration file, only new packages created after the change, or older packages from a previous PPB version for which the runtime files are updated, will receive these properties. |
By default, you can only manually change the value of custom properties directly in the Package.xml of the corresponding package. If you want the property to be displayed and changeable in the PPB's user interface via "Management > Properties", proceed as follows:
- Create a new file named Custom.PackageData.xml in the Resources subdirectory of the PPB installation directory and open it with your favorite XML editor.
- Insert the following (sample) XML code:
<?xml version="1.0" encoding="utf-8"?>
<PackageData>
<PropertyGroupData>
<PropertyGroup Name="CustomPackageData" OrderIndex="5">
<DisplayName>{en} Custom Package Properties {de} Benutzerdefinierte Paketeigenschaften</DisplayName>
<Description>{en} This section contains user-defined package properties {de} Dieser Abschnitt enthält benutzerdefinierte Paketeigenschaften</Description>
</PropertyGroup>
</PropertyGroupData>
<PropertyData>
<Property Name="InternalAppID" Group="CustomPackageData" PropertyType="GUID" DefaultValue="" OrderIndex="1" >
<DisplayName>{en} Internal App ID {de} Interne Applikations-ID </DisplayName>
<Description>{en} Internal GUID of the package that references the ticket ID of the packaging request. {de} Interne GUID des Pakets, die auf die Ticket-ID der Paketierungsanforderung referenziert. </Description>
</Property>
</PropertyData>
</PackageData>
- Of course, you can customize the names and contents of the XML properties. In particular, the value of the property's Name property must match the name of the custom property defined in the template or in the config file.
- Save the XML file and restart the Packaging PowerBench. Now, when you open a package for which this property is defined (either via the template or globally via PackagingPowerBench.exe.config), it is displayed in the "Management > Properties" window in the section you defined, and it's value can be changed.