Skip to content

About Directive Files

Paquet Builder introduces a specific file type called “directive file”, using the .pbd extension.
These text-based files contain instructions for Paquet Builder to create or modify a package/installer.

  • Automate Package Creation — Useful for external applications needing to generate packages dynamically.
  • Modify Existing Projects — Enables automated transformations of existing projects.
  • Shell Extension Support — The Paquet Builder shell extension works with directive files.

Recommended Format: Save directive files in UTF-8 (with or without BOM).

Learn More: How to Open and Execute Directives.

Directive files follow a format similar to Windows INI configuration files.

; Paquet Builder Directive File
; Version 1.1
[DirectiveVariables]
MYVERSION=1.0
[General]
Title=My archive {$MYVERSION$}
ProjectTemplate=C:\MyWork\MyProject\baseproj.pbpx
OutputDir=C:\MyWork\MyProject\output
OutputName=MyArchive.exe
Company=G.D.G. Software
EXEType=0 ; 32-bit package (0=32-bit, 1=64-bit, 2=ARM64)
IsWizard=1
StorePaths=1
Folder=C:\MyWork\Source\
SubFolders=1
Icon=C:\MyWork\MyProject\media6.ico
[Source]
0=C:\MyWork\MyProject\Source\*.*
1={$PBDIRECTPATH$}\Data Source Files\*.xml
  • [General] — Configures the package settings (always required).
  • [Source] — Lists files to include (unless NoSourceSection=1 is set).

This section defines the package configuration.

  • Parameters can be specified in any order.
  • Boolean values: Use 1 (true) or 0 (false).
ParameterDescription
BinFolderDefines the root folder for temporary output files.
CheckRightsChecks for administrative rights (1=Yes, 0=No).
CompanyDefines the company name. Mandatory if using the command-line compiler.
CompressionCPUThreadsNumber of CPU threads used for compression (LZMA2 required).
CompressionEngineDefines the unpacking engine: 0=Auto, 1=Small engine, 2=Full-featured engine.
CompressionLevelCompression level for 7-Zip (0=No compression, 4=Ultra compression).
CompressionLZMA2Enables LZMA2 compression instead of LZMA (1=Yes, 0=No).
CompressionSolidEnables solid compression (1=Yes, 0=No).
CopyrightDefines the copyright string in the installer.
CryptFilenamesEncrypts filenames in the archive (1=Yes, 0=No).
DestFolderDefines the destination folder for extracted files (do not use for Setup projects).
DigitalSignEnables digital signing (1=Yes, 0=No).
EmailSpecifies the company’s email address.
EncryptFilesEncrypts files during compression (1=Yes, 0=No).
EndPromptCustom message shown at the end of the package execution.
EXETypeDefines bitness: 0=32-bit (default), 1=64-bit, 2=ARM64.
ExistingArchiveSpecifies the full path to an existing 7-Zip archive instead of listing files manually.
FileDescSets the file description in version info.
ForceIntegrityForces integrity check on signed executables (1=Yes, 0=No). Default: 0.
FileDescUninstSets the uninstaller file description in version info.
FileVerNumSets the file version number in version info.
FolderDefines the root folder for storing path information.
HideProgressHides the extraction progress window (1=Yes, 0=No).
HomepageSpecifies the company’s website URL.
IconPath to the package icon file.
IconUninstPath to the uninstaller icon file.
InstallMSIIndicates whether the file in SetupExec is a Windows Installer MSI file (1=Yes, 0=No).
InstallScopeDefines the installation scope mode: -1=None (legacy), 0=Current User, 1=All Users, 2=User Choice, 3=Automatic. See Installation Scope.
IsWizardEnables the wizard-style interface (1=Wizard UI, 0=Standard UI).
KeepExistingProjectFilesIf using ProjectTemplate, retains existing files (1=Yes, 0=No).
KeyProtectDefines the password used for encrypting files.
LiveUpdateEnables live update when using ProjectTemplate (1=Yes, 0=No).
MinimumElevatedRightsRequired elevation level if RequestElevatedRights=1: 0=Require Admin, 1=Highest Available.
MinimumUserRightsRequired user rights if CheckRights=1: 0=Admin, 1=Power User.
MultiVolumeArcCreates a multi-volume archive (1=Yes, 0=No).
NoSourceSectionDisables the [Source] section (1=Yes, 0=No).
OutputDir (Required)Specifies the output directory for the generated package.
OutputName (Required)Defines the package filename (e.g., Setup.exe).
OverwriteReadOnlyAllows overwriting read-only files (1=Yes, 0=No).
PackMode (Required)Specifies package type: 0=Standard, 1=Setup, 2=Archive.
PasswordToAskDefines the password required to extract or install the package.
PFXFilePath to the PFX file for digital signing (ignored if SignCertifLocation=1).
PFXKeyPassword for the PFX file (if required).
ProdVerNumDefines the product version number in version info.
ProjectPath to the project file (.pbpx) that Paquet Builder should create.
ProjectTemplateUses an existing project template and modifies it dynamically.
ReplaceStartupEnables file replacement at Windows startup (1=Yes, 0=No).
RequestElevatedRightsRequests UAC elevation (1=Yes, 0=No).
ScopeFailOnAdminFail if admin rights cannot be obtained when scope requires them (1=Yes, 0=No). Default: 0. Only applies when InstallScope is set.
ScopeRequestUACRequest UAC elevation for All Users scope (1=Yes, 0=No). Default: 1. Only applies when InstallScope is set.
SetupExecPath to the setup loader for installer-type projects.
SetupParamsCommand-line parameters for the setup loader.
ShowCompSelDlgDisplays the Select Components dialog (1=Yes, 0=No).
SignCertifLocationDefines where to get the code signing certificate or the signing method: 0=PFX, 1=Windows Store, 2=Thumbprint, 3=SignTool Commands, 4=Azure Artifact Signing, 5=JSign (see JSignCmd section below).
SignDllsAlso sign embedded DLLs (1=Yes, 0=No). Default: 1.
SignMethodDefines the message digest method: 0=SHA-256 & SHA-1, 1=SHA-256 only, 2=SHA-1 only. Ignored if SignCertifLocation > 2.
SignUninstAlso sign the uninstaller executable (1=Yes, 0=No). Default: 1.
SilentEnables silent mode (1=Yes, 0=No).
SizeCheckActivates size checking (1=Yes, 0=No).
StartPromptDefines a custom startup prompt.
StorePathsDefines whether path information is stored (1=Yes, 0=No).
SubFoldersIncludes subfolders when adding files (1=Yes, 0=No).
Title (Required)Sets the title of the package.
ArtifactSignEndpointDefines the Azure Artifact Signing account endpoint (must match your Azure region). Old name TrustSignEndpoint is still accepted.
ArtifactSignCodeSigningAccountNameSpecifies the Azure Artifact Signing account name. Old name TrustSignCodeSigningAccountName is still accepted.
ArtifactSignCertificateProfileNameDefines the certificate profile name for signing with Azure Artifact Signing. Old name TrustSignCertificateProfileName is still accepted.
UIModernEnables the modern UI interface: 0=Classic UI, 1=Modern UI. Overrides IsWizard if specified.

This section lists files to be included in the package.

  • Supports wildcards (e.g., *.exe, *.xml).
  • Allows absolute or relative paths using directive variables.
[Source]
0=C:\MyWork\Project\Source\*.*
1=C:\MyWork\Project\Readme.txt
2=C:\Windows\System\cabinet.dll
3={$PBDIRECTPATH$}\Data\*.xml

Use directive variables like {$PBDIRECTPATH$} to avoid hardcoded paths.

Defines optional components that users can select during installation.

[Components]
0=Documentation
1=Pictures
[Documentation.Source]
0=C:\Project\Help\*.chm
[Documentation.Properties]
Description=Application Documentation
Title=Documentation
StoringPath=1
[Pictures.Source]
0=C:\Project\Media\*.png
1=C:\Project\Media\*.jpg
[Pictures.Properties]
Title=Pictures
Description=Sample pictures
Required=0
InstallDef=1
SourceLinked=1
SourceFolder=C:\Project\Media
IncSubFolders=1
  • Each component requires a [ComponentName.Source] and [ComponentName.Properties] section.
  • The Main component always exists and is defined in [Main.Properties].
PropertyDescription
TitleDisplay name of the component in the selection dialog.
DescriptionDescription shown to the user during installation.
VariableRuntime variable name for this component (e.g., %VCOMPDOCUMENTATION%). Auto-generated if not specified.
RequiredComponent is required and cannot be unchecked (1=Yes, 0=No). Default: 0.
InstallDefComponent is checked by default (1=Yes, 0=No). Default: 1.
NoDisplayHide the component from the selection dialog (1=Yes, 0=No). Default: 0.
SourceLinkedLink to a source folder for live updates (1=Yes, 0=No). Default: 0.
SourceFolderPath to the source folder when SourceLinked=1.
CustomDestinationFolderOverride the destination folder for this component’s files.
IncSubFoldersInclude subfolders when scanning source folder (1=Yes, 0=No). Default: 0.
ExcludeComponentExclude this component from the build (1=Yes, 0=No). Default: 0.
FileMaskIncludeWildcard mask for including files (e.g., *.dll;*.exe).
FileMaskExcludeWildcard mask for excluding files (e.g., *.pdb;*.log).
StoringPathHow file paths are stored: 0=Default, 1=Absolute, 2=No path (flat), 3=Relative.
RootFolderRoot folder for relative path storage (StoringPath=3).

Learn more: Component Management.

Directive variables allow dynamic path replacement in directive files.

VariableMeaning
{$PBDIRECTPATH$}Path to the directive file folder.
{$PBTEMPLATEPATH$}Path to the template project folder.
{$PBDOCPATH$}Path to the user’s Documents folder.
[Source]
0={$PBDIRECTPATH$}\Source Files\*.*
1={$PBDIRECTPATH$}\Docs\*.pdf

This way, you can move the directive file without breaking file paths.

This section allows you to load HTML content into the installer’s screens (Welcome, License Agreement, Readme, Final screen).

[Templates]
Welcome=C:\MyProject\screens\welcome.html
LicAg=C:\MyProject\screens\license.html
StartReadme=C:\MyProject\screens\readme_start.html
EndReadme=C:\MyProject\screens\readme_end.html
End=C:\MyProject\screens\final.html
Template KeyScreen
WelcomeWelcome screen
LicAgLicense / End-User Agreement
StartReadmeReadme shown before installation
EndReadmeReadme shown after installation
EndFinal screen
  • Values can be absolute paths or relative filenames (looked up in the Templates\ folder next to PBuilder.exe).
  • Files can be HTML or legacy RTF (automatically converted to HTML).
  • Template variables like [ARCHIVETITLE], [COMPANYNAME], [COMPANYEMAIL], [HOMEPAGE], [COPYRIGHT], [DESCRIPTION], [PRODNUM], [FILENUM] are replaced with project values.

[SignToolCmd] Section — Custom SignTool Commands

Section titled “[SignToolCmd] Section — Custom SignTool Commands”

This section allows multiple digital signatures to be applied sequentially. Only used when SignCertifLocation is set to 3.

Example:

[SignToolCmd]
0=sign /fd SHA256 /tr "http://timestamp.digicert.com" /td SHA256 "{$PBOUTPUTFILE$}"
1=sign /fd SHA1 /tr "http://timestamp.digicert.com" /td SHA1 "{$PBOUTPUTFILE$}"
  • Each line represents one signing command.
  • Commands are executed in order (e.g., first SHA-256, then SHA-1).

This section defines JSign signing commands when SignCertifLocation is set to 5.

JSign is a free, open-source Java-based code signing tool supporting PFX/PKCS#12, hardware tokens (ETOKEN, YUBIKEY), Azure Key Vault, AWS KMS, Google Cloud KMS, and more.

Example:

[JSignCmd]
0=sign --keystore "certificate.p12" --storepass "mypass" --tsaurl http://timestamp.sectigo.com --tsmode RFC3161 --digest-algorithm SHA-256 "{$PBOUTPUTFILE$}"
PlaceholderReplaced with
{$PBOUTPUTFILE$}Full path to the output file being signed.
{$PBOUTPUTFOLDER$}Path to the output folder.

Create your own variables inside [DirectiveVariables].

[DirectiveVariables]
MYVERSION=1.0
OUTPUTNAME=Installer

Use them in any section:

[General]
Title=My archive {$MYVERSION$}
OutputName={$OUTPUTNAME$} {$MYVERSION$}.exe

Example: Simple Directive File Without Source

Section titled “Example: Simple Directive File Without Source”
; Paquet Builder Directive File
[General]
Title=My archive 1
NoSourceSection=1
OutputName=Direct2.exe
OutputDir=C:\Build\Output
ProjectTemplate=C:\Build\Template.pbpx
LiveUpdate=1

Use NoSourceSection=1 if your directive modifies an existing project without changing its file list.