Customizing Installation Content
You can change what is installed for PSQL by using one of the following methods:
Using PTKSetup.ini Settings
Once you have modified PTKSetup.ini by uncommenting any properties and setting them to new values, you can simply run the installer from the command line to use those properties in the .ini file.
*Note: If you include an MSI property on the command line, but it is uncommented and set in PTKSetup.ini, the PTKSetup.ini value is used.
The available PTKSetup.ini properties are covered in PTKSetup.ini Settings.
Specifying a PSQL Key
Before PSQL v11, you could specify a PSQL authorization key as an attribute in the PTKSetup.ini file. The same key could be used for multiple installations. Since PSQL v11, each installation requires a unique key. You can still specify a key in PTKSetup.ini, but it must be unique to the machine where the installation runs.
Various means are used for distribution of keys, such as a key printed on the product packaging or included inside the box or in email to the end user. Whatever method you use to distribute keys, one way to ensure uniqueness of the key in PTKSetup.ini is for your application installation to prompt the end user for the key. Your application installation could then write that key to a local copy of PTKSetup.ini and continue with the installation process that uses PTKSetup.ini. The PSQL installation process will automatically authorize a valid key if one is specified in PTKSetup.ini. Note that part of key validity is that it must be unique for the machine on which the installation is being performed.
Using an Alternate Configuration File Location with the Install Executable
The MSI Public Property PVSW_CFG_FILE can be set to use an alternate configuration file by passing a fully qualified file path name on the command line when you run the installer executable. The property and its value are passed to the underlying Windows process (msiexec).
Before passing the property, determine whether its value contains spaces. If not, your command should resemble the following:
Install_<product>.exe /v"PVSW_CFG_FILE=c:\temp\ConfigFile.ini"
*Note: All properties after /v are passed to msiexec.exe. The /v option has no space after it.
If the property value contains spaces, you must enclose it in double quotation marks preceded by a backslash (\"), as in this example:
Install_<product>.exe /v"PVSW_CFG_FILE=\"c:\temp\My Folder\ConfigFile.ini\""
Combinations of the examples above can be used to pass multiple property settings:
Install_<product>.exe /v"PROPERTY1=0 PROPERTY2=\"c:\My Path\File.txt\""
See also Prerequisites for Installing a PSQL MSI.
1
2
Install_<product>.exe /v"/l*v \"%TEMP%\PSQL_<version>_Install.log\" PVSW_PSQL_INSTALL_DOCUMENTATION=0"
3
Press Enter.
The installation program runs interactively, without the documentation option.
1
2
Install_<product>.exe /v"/l*v \"%TEMP%\PSQL_<version>_Install.log\" PVSW_PSQL_LICENSE_KEY=NG2ZE-ZKS3C-D2CFK-9IR6K-G2C3X"
Changing Installation Package Size and Features Using CAB Files
The PSQL installation includes cabinet (CAB) files that can be removed from your installation package to decrease the overall size of the installation package and avoid using unnecessary files. Removing these files automatically removes the corresponding feature from the list of available features in the graphical user interface during a custom installation.
This section covers the following topics:
Working with CAB Files and Future Updates
CAB files are located in the same directory as the MSI. CAB files beginning with an underscore (_) are required for that installation type.
The core set of CAB files does not change. However, PSQL updates contain additional CAB files from the original set released for the major version of the product to cover newly added components or features. Be sure and obtain the latest files for the installation type and optional features you need.
Required CAB Files
CAB files that are required are designated by a name that begins with an underscore. The following table lists the cabinet files required for each installation package type.
Required Files Other than CAB
In addition to the files listed under Required CAB Files, your custom installation must have the following items in a folder called Data, located in the same folder where the installer executable runs:
SetupProduct32_x86.exe
SetupProduct64_x64.exe
Where Product is Server, ServerVx, Client, or Workgroup. In the case of Workgroup, the 64-bit setup.exe is called SetupWorkgroup32_x64.exe.
Optional CAB Files
The following table lists optional features by the installation package type that applies them. If you want to install them, you must leave them in their location under the Data folder described in the previous topic. For more information on these features, see PSQL Optional Features in Getting Started with PSQL.
1 PSQL Workgroup is a 32-bit application. However, separate installation packages are provided for 32- and 64-bit operating systems.
Optional Feature Dependencies
Certain optional features require that other components accompany them in order to function. The following table lists the optional features that require other components.
*3
*4
*5
*6
1 PSQL Control Center
2 Includes all other utilities not listed in this table. The additional utilities that require Java, such as Phone Authorization Wizard, bcfg, and bmon, require EclipRCP.cab, JRE.cab, and JreUtils.cab. The common PSQL Utilities (non-Java) such as License Administrator and Function Executor, require Utils2.cab and Utils.cab.
3 Required for Client, Workgroup, and Server
4 Required for Workgroup and Server
5 Required for Server
6 Required for Workgroup and Server
CAB File Installation Example
The following provides an example of customizing your installation using CAB files. This example installs the Workgroup engine with documentation as the only optional feature.
*Note: Documentation requires that you install the Eclipse framework and the PSQL Control Center.
This example is for a system running on a Windows operating system.
1
2
The files listed in these two steps are the only CAB files that you need in order to install the Workgroup Engine and documentation. All other CAB files may be removed from the installation package. All non-CAB files described under Required Files Other than CAB must also remain in the installation package.
Embedding PSQL in Your Application
To embed PSQL in your application, we recommend using Windows Installer. Originally called the Microsoft Installer, its acronym is MSI and its file extension is .msi.
This section covers the following topics:
Prerequisites for Installing a PSQL MSI
PSQL MSI installation requires the following:
The target system must contain the minimum version of Windows Installer supported by PSQL, which is Windows Installer 3.1. To see what version of the Windows Installer you have on your system, run msiexec /? at a command prompt. If you are unsure whether the system has MSI 3.1 or later, install using the installation executable with the /v option.
In addition to the syntax and options displayed by running msiexec /? at a command prompt, MSI technology is fully documented by Microsoft on its website.
PSQL Installers and Related MSI Files
The following table lists PSQL products with their .msi files.
Customizing PSQL Embedding with a Microsoft Transform
The Microsoft transform (MST) provides a method of customizing your embedded installation. An .mst file is a set of changes to use during installation. Using a transform file to customize your installation allows for flexibility in selecting features and simplifies product updates.
To generate a MSI transform, you must work with the installer database that stores application information needed during installation. You can use several tools to generate a transform file, including InstallShield, Microsoft Orca, or the MSI utilities in the Windows Platform SDK.
Example: Creating an Embedded Installation Without Shortcuts
A common use case for a transform file is to embed a PSQL installation without creating shortcuts in the Start menu or on the Desktop. The following steps provide an an example of this customization.
1
2
3
Original
CreateShortcuts   <null_value>  <sequence_number>
Revised
CreateShortcuts   NOSHORTCUTS   <sequence_number>
The undefined property name NOSHORTCUTS will cause the CreateShortcuts action to be skipped.
4
5
6
Here is an example installation based on these steps:
msiexec.exe /i {path}\PervasivePSQLv12<product-type>_<platform>.msi /qn REBOOT=ReallySuppress /l*v "%temp%\PSQL_<version>_Install.log" TRANSFORMS=MyTransform.mst PSQL_PREREQS_INSTALLED=Y
Combining MSI Options and PTKSetup.ini Settings
You can combine MSI options and parameters and PTKSetup.ini file settings in a PSQL installation. To do this, be sure to disable the property in the .ini file by commenting it out. Then, run the installation from the command line using the options you disabled in the file.
The following examples combine methods used in the previous examples.
1
;PVSW_PSQL_INSTALL_DOCUMENTATION=1
2
PVSW_PSQL_INSTALL_DOCUMENTATION=0
3
4
msiexec.exe /i <PervasivePSQLProductName>.msi /qn PSQL_PREREQS_INSTALLED=Y
1
;PVSW_PSQL_LICENSE_KEY=
2
PVSW_PSQL_LICENSE_KEY=NG2ZE-ZKS3C-D2CFK-9IR6K-G2C3X
See also Specifying a PSQL Key.
3
4
msiexec.exe /i <PervasivePSQLProductName>.msi /qn PSQL_PREREQS_INSTALLED=Y
Using an Alternate Configuration File Location with the MSI File
Use the MSI file only if the MSI prerequisites are met. See Prerequisites for Installing a PSQL MSI.
The MSI Public Property PVSW_CFG_FILE can be set to use an alternate configuration file by passing a fully qualified file path name on the command line.
Before passing the property, determine whether its value contains spaces. If not, your command should resemble the following:
msiexec.exe /i "{path}\MSIPackage.msi" PSQL_PREREQS_INSTALLED=Y PVSW_CFG_FILE=c:\temp\ConfigFile.ini
If the property value contains spaces, you must enclose it in double quotation marks as in this example:
msiexec.exe /i "{path}\MSIPackage.msi" PSQL_PREREQS_INSTALLED=Y PVSW_CFG_FILE="c:\My Folder\ConfigFile.ini"
Using Silent Installation
A silent installation runs without interaction from a user and by displaying little to no user interface during installer execution. It can be accomplished in two ways:
Because silent installations cannot launch other installations automatically, you may need to execute other installations to make sure that the product is completely up to date. See Special Considerations for Silent (or Basic UI) Installation.
Silent Installation Examples Using Only the Installer Executable
The following is an example of installing PSQL v12 Client silently and creates a log file in the user's temp folder:
Install_PSQL_Client.exe /s /v"/qn /l*v \"%TEMP%\PSQL_<version>_SilentInstall.log\""
The next example creates a log file in the user’s temp folder and sets license key and service installation options:
Install_PSQL_Workgroup_Engine.exe /s /v"/qn REBOOT=ReallySuppress PVSW_PSQL_LICENSE_KEY={key_value} PVSW_RUN_WGE_AS_SVC=Y TRANSFORMS=MyTransform.mst /l*v \"%TEMP%\PSQL_<version>_Install.log\""
*Note: If you specify no log file name and file location, a default file is written to the %temp% folder. The file name is PSQL_<version>_<product>_<architecture>_Install.log. For example, PSQL_v12_Server_x64_Install.log.
Silent Installation Examples Using MSI
The embedding of an .msi file for one product in the installation of another product is often done by silent installation. The following example creates a log file in the user’s temp folder and specifies the license key and service installation options. See also Prerequisites for Installing a PSQL MSI.
msiexec.exe /i {path}\PervasivePSQLv12WGE32_x86.msi /qn REBOOT=ReallySuppress PVSW_PSQL_LICENSE_KEY={key_value} PSQL_PREREQS_INSTALLED=Y PVSW_RUN_WGE_AS_SVC=N TRANSFORMS=MyTransform.mst /l*v "%TEMP%\PSQL_v12_Install.log"
This example uses a Microsoft transform file (.mst) to customize the installation. For more information, see Customizing PSQL Embedding with a Microsoft Transform.
*Note: Unless you specify a log file name and file location, no log file is created.
Determining When a Silent Installation Has Finished
You may use either of the following methods to determine when a silent installation has completed.
1
Note that everything after the install<product>.exe command line option /v is passed to msiexec.exe. See Prerequisites for Installing a PSQL MSI. See also the Flexera Helpnet website for additional information on how to pass msiexec.exe command line options via the InstallShield launcher (install.exe).
2
The following is an example batch script that installs PSQL 64-bit Server.
@REM Sample script for launching the 64-bit PSQL Server Engine
@REM   silently. Assumes script is in the same folder as the
@REM   installation executable, all required pre-requisites
@REM   have already been installed and the script is executed
@REM   with Administrator privileges if UAC is enabled.
@echo off
set TS_FILE="%windir%\system32\change.exe"
set MODE=ReallySuppress
set MSI_FILE="%CD%\Data\Data\PervasivePSQLv12Server64_x64.msi"
set MSI_LOG="%CD%\PSQLv12Server64_x64_Silent_MSI_install.log"
set MSI_CLI=/i %MSI_FILE% PSQL_PREREQS_INSTALLED=Y /l*v %MSI_LOG% /qn REBOOT=%MODE%
set MSP_FILE="%CD%\Data\Data\Redist\Data\PSQLv12Patch_Server64_x64.msp
set MSP_LOG="%CD%\PSQLv12Server64_x64_Silent_patch_install.log"
set MSP_CLI=/update %MSP_FILE% /l*v %MSP_LOG% /qn REBOOT=%MODE%
echo Starting silent PSQL install...
if EXIST %TS_FILE% (
  echo Terminal Services system detected
  echo ...changing to 'install' mode
  change user /install
)
echo ...running main PSQL MSI install
%windir%\system32\msiexec.exe %MSI_CLI%
if NOT exist "%MSP_FILE%" goto RESUME
echo ...applying PSQL patch
%windir%\system32\msiexec.exe %MSP_CLI%
:RESUME
if EXIST %TS_FILE% (
  echo -- Reset install mode, if needed
  change user /execute
)
echo PSQL Installation Complete!
*Note: The example is for Server Engine. For other products, change the installer names and log files for those products. Also, certain operating systems require you to run batch scripts as Administrator. Make sure that you have the rights to run a batch script.