PnP Driver Installer Reference Manual - Thesycon Systemsoftware ...
PnP Driver Installer Reference Manual - Thesycon Systemsoftware ...
PnP Driver Installer Reference Manual - Thesycon Systemsoftware ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong><br />
A Customizable <strong>PnP</strong> <strong>Driver</strong><br />
<strong>Installer</strong> for Windows<br />
<strong>Reference</strong> <strong>Manual</strong><br />
Version: 1.6.0<br />
Date: 30 July 2012<br />
Authors: Günter Hildebrandt<br />
Rene Möller<br />
<strong>Thesycon</strong> <strong>Systemsoftware</strong> & Consulting GmbH<br />
Werner-von-Siemens-Str. 2<br />
D-98693 Ilmenau<br />
Germany<br />
Tel: +49 3677 8462 0<br />
Fax: +49 3677 8462 18<br />
http://www.thesycon.de<br />
® <strong>Thesycon</strong> <strong>Systemsoftware</strong>&ConsultingGmbH
Contents<br />
Contents<br />
Table of contents 3<br />
1 Introduction 5<br />
1.1 Supported Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5<br />
1.2 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5<br />
2 Operation 7<br />
2.1 <strong>Driver</strong> Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7<br />
2.1.1 Operation Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7<br />
2.1.2 System Setup Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . 7<br />
2.2 <strong>Driver</strong> Uninstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8<br />
2.3 Demo Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8<br />
2.4 Silent mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8<br />
2.4.1 Silent Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9<br />
Command Line Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 9<br />
Exit codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9<br />
2.4.2 Silent Uninstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12<br />
Command Line Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 12<br />
Exit codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12<br />
2.5 Signing <strong>Driver</strong> Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br />
3 Customization 14<br />
3.1 Delivery package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14<br />
3.2 Installation Files (.inf) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14<br />
3.3 <strong>Installer</strong> Configuration (setup.ini) . . . . . . . . . . . . . . . . . . . . . . . . . . 15<br />
3.3.1 [Setup] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15<br />
3.3.2 [Setup_x86] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17<br />
3.3.3 [Setup_x64] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20<br />
3.3.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22<br />
4 Limitations 24<br />
<strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong> 3
1 Introduction<br />
1 Introduction<br />
The <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> can be used to install kernel mode drivers for Windows in a reliable and<br />
convenient way. It can handle the first-time installation, driver update or removal of the driver<br />
software. The driver installer can be run with a graphical user interface or in silent mode. It can be<br />
customized to support different devices and kernel-mode drivers. Regardless of the system state<br />
the installer makes sure that the correct driver is installed. Currently, it supports the languages<br />
English and German. Further languages can be added on request.<br />
1.1 Supported Operating Systems<br />
The <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> supports the following operating systems:<br />
• Windows 2000<br />
• Windows XP (32 and 64 bit)<br />
• Windows Server 2003 (32 and 64 bit)<br />
• Windows Home Server<br />
• Windows Vista (32 and 64 bit)<br />
• Windows Server 2008 (32 and 64 bit)<br />
• Windows 7 (32 and 64 bit)<br />
• Windows Server 2008 R2<br />
• Windows Home Server 2011<br />
• Windows 8 (32 and 64 bit)<br />
• Windows Server 2012<br />
1.2 Features<br />
The <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> provides the following features:<br />
• Support for first-time installation, driver update and removal of the driver software.<br />
• Removes all other driver packages for the device that match the hardware IDs of the package<br />
to be installed.<br />
• Installs exactly the driver version included in the installed package (even in the case of a<br />
rollback).<br />
• Interactive mode with graphical user interface.<br />
• Silent mode to integrate the installer into other setups.<br />
• Support for different languages.<br />
<strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong> 5
1 Introduction<br />
• Can be customized easily.<br />
• Supports signed and unsigned drivers.<br />
6 <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong>
2 Operation<br />
2.1 <strong>Driver</strong> Installation<br />
2.1.1 Operation Sequence<br />
2 Operation<br />
At first the setup application checks whether there is an existing installation on the target system.<br />
If that is the case and if it differs from the current setup it is uninstalled no matter whether the<br />
existing installation is older or newer. Afterwards, the setup performs a cleanup based on the<br />
information available in the driver package to install. During this cleanup all drivers that match one<br />
of the hardware IDs supported by the driver package are uninstalled, including their assignment to<br />
corresponding devices. The cleanup is important in cases the removal of an existing installation<br />
failed for any reason or drivers have been installed in another way, e.g. by means of system tools<br />
like the device manager. In the next step the setup application performs a preinstallation of the<br />
driver software. This means that the driver will be installed on the system but not yet assigned to<br />
any device. The system assigns the driver as soon as it recognizes that the corresponding device<br />
is connected. Before the driver is assigned the system checks whether there is another matching<br />
driver that is a better choice for the device. The decision which driver is better depends on the<br />
operating system, the driver version and signature of the driver package. Both the removal of an<br />
existing installation and the additional cleanup make sure that only the driver provided with the<br />
setup is present on the system and successfully assigned to the corresponding device, independent<br />
of the operating system and no matter whether the driver package is installed the first time, or an<br />
update or a rollback is performed.<br />
If the setup is running with a graphical user interface it prompts the user at the end of the installation<br />
to disconnect and reconnect the device. This ensures that the driver is also assigned in the<br />
case the user not yet connected the device to the system or in the case the system cannot recognize<br />
the current connection for any reason. The user may ignore this request and can connect the device<br />
at a later point in time to complete the installation successfully.<br />
In the case the setup is executed and detects an existing installation that is identical the user is just<br />
informed that the installation completed. No further installation steps will be performed.<br />
2.1.2 System Setup Dialogs<br />
Depending on the operating system and the driver package (signed/unsigned, setup class) Windows<br />
may rise additional setup dialogs, e.g. to prompt the user to confirm installation of an<br />
unsigned driver, to trust the driver vendor or to assign the installed driver to a connected device<br />
(Found New Hardware Wizard). The <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> minimizes their appearance and integrates<br />
the remaining, inevitable dialogs as good as possible into its user guidance. Under Windows<br />
XP and the corresponding server systems the Found New Hardware Wizard may appear at the end<br />
of the installation or later when the system detects a connected device. This system wizard prompts<br />
the user to assist the assignment of the preinstalled driver to the device. The user just has to follow<br />
the instructions of the hardware wizard, i.e., he can choose the option "No, not this time" on the<br />
first page and should continue with "Next" on every following page until the wizard finished.<br />
Windows setup dialogs can be avoided by signing the driver package (see section 2.5).<br />
<strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong> 7
2 Operation<br />
2.2 <strong>Driver</strong> Uninstallation<br />
During every installation the uninstallation support is installed as the very first step. So if the<br />
installation fails for any reason (see section 2.4.1) the uninstallation can be performed to cleanup<br />
the system. The uninstallation is supported in the following ways:<br />
1. If an installation is performed and the setup detects an existing installation on the target<br />
system that differs from the current one the uninstaller of the existing installation is executed<br />
before the new installation starts (see section 2.1.1). That means it is not required to<br />
explicitly cleanup the system before an installation. This is implicitly done by the installer.<br />
2. If not specified otherwise the installer creates an entry in the programs control panel of the<br />
system, which is the ’Programs and Features’ control panel under Windows Vista and later<br />
and the ’Add or Remove Programs’ control panel before Windows Vista. The user may run<br />
the driver uninstallation by means of this control panel. In this case the uninstaller shows a<br />
graphical user interface. You can prevent the installer from creating an entry in the control<br />
panel by means of the appropriate command line parameter (see section 2.4.1). This may<br />
be useful if you provide an enclosing setup and you don’t want to allow the user to uninstall<br />
the driver package separately.<br />
3. The setup allows to perform an explicit silent uninstallation. Especially enclosing setups like<br />
application setups are addressed by this feature. Usually the uninstallation of the enclosing<br />
setup should also involve the uninstallation of the driver package. The driver setup provides<br />
the appropriate command line parameters (see section 2.4.2). Note that it is not required to<br />
use the same version of the setup executable that installed the existing driver package, but it<br />
has to be a setup executable of the same product which is defined by the setup.ini. The called<br />
setup executable may be located anywhere on the system but the corresponding setup.ini file<br />
has to be located in the same folder. The caller of the uninstallation is responsible for the<br />
deletion of the setup executable file, if required, because the application doesn’t delete itself<br />
when uninstallation is finished.<br />
Note: You should always wait for the result of the uninstallation! The uninstallation may be<br />
aborted for reasons that requires some user interaction (see section 2.4.2). Furthermore, any<br />
following installation will be aborted as long as the uninstallation is running. Even if your<br />
enclosing setup application does not intend to run an installation immediately after, the user<br />
may do so.<br />
2.3 Demo Version<br />
The demo version of the <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> is free and has no limitations except that it requires to<br />
run the Demo Mode Control Panel DemoModeCpl.exe concurrently. The panel must be started<br />
before the setup can be used. It requests the user to enter a random number and to enable the<br />
Demo mode by clicking the button ’Enable’. The Demo Mode Control Panel is always displayed<br />
on top of the desktop. It has to run until the (un-)installation is finished.<br />
2.4 Silent mode<br />
The <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> supports a silent mode that can be enabled with command line options.<br />
This mode is designed to integrate the <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> into a surrounding setup program.<br />
8 <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong>
When using this mode the following facts have to be considered:<br />
2 Operation<br />
• The silent mode only suppresses the graphical user interface of the setup application. It<br />
does not suppress any Windows setup dialog that may appear. Windows setup dialogs can<br />
be suppressed by signing the driver package (see section 2.5).<br />
• The setup is not a console mode application, even when running in silent mode. This means<br />
when executed on the command line the command prompt returns immediately while the<br />
setup is still running. To get the setup’s exit code it should be started by an application that<br />
is able to wait for another process.<br />
• The caller of the setup is responsible for user guidance which depends on the exit code (see<br />
sections 2.4.1 and 2.4.2).<br />
• As described in section 2.1.1 the installation is not completed until the system detects a connected<br />
device and assigns the preinstalled driver. To ensure that the driver is also assigned in<br />
the case the user not yet connected the device to the system or in the case the system cannot<br />
recognize the current connection for any reason the caller of the setup should prompt the<br />
user at the end of the installation to disconnect and reconnect the device like the <strong>PnP</strong> <strong>Driver</strong><br />
<strong>Installer</strong> does when running with graphical user interface.<br />
2.4.1 Silent Installation<br />
Command Line Parameters<br />
Parameter Description<br />
/S Run installer in silent mode.<br />
/DIR="target path" Installation directory on the target system. If not specified the<br />
installation directory given by the setup.ini file is used.<br />
/NOPCPL Prevent the installer from installing uninstallation support in the<br />
programs control panel of the system, which is the ’Programs and<br />
Features’ control panel under Windows Vista and later and the<br />
’Add or Remove Programs’ control panel before Windows Vista<br />
respectively.<br />
Example: setup.exe /S /DIR="c:\MyCompany\MyProduct"<br />
Exit codes<br />
Status<br />
Code<br />
Description Recommended Action<br />
0 The setup finished successfully. -<br />
100 Setup aborted: Another <strong>PnP</strong> instal- Inform the user to close all open hardware<br />
lation process is currently running installation wizards. If currently no wizard<br />
on the system.<br />
is open the system probably is performing<br />
some installation steps in the background.<br />
Just wait some time. Then run setup again.<br />
<strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong> 9
2 Operation<br />
101 Setup finished successfully. But to<br />
complete driver installation a restart<br />
is required.<br />
102 Setup aborted: The current operating<br />
system is not supported by the<br />
setup.<br />
Reboot the system. If the device is already<br />
connected no disconnect/reconnect is required<br />
anymore after reboot.<br />
Inform the user and abort.<br />
103 Setup aborted: Unexpected error. Inform the user and abort. The setup creates<br />
a log file in the user’s temp directory.<br />
This file may help to analyze the problem.<br />
104 Setup aborted: The current user has<br />
no administrator privileges which<br />
are required to proceed.<br />
Inform the user and abort.<br />
109 Setup aborted: Invalid command Call the setup with correct command line<br />
line parameters.<br />
parameters.<br />
111 Setup aborted: The installer / unin- The user has to finish the running (un-) installer<br />
is already running.<br />
stallation at first.<br />
112 Setup aborted: The installation directory<br />
could not be created on the<br />
destination system.<br />
113 Setup aborted: The uninstaller file<br />
could not be extracted to the installation<br />
directory.<br />
114 Setup aborted: Not all required files<br />
could be installed (Probably one or<br />
more files already exist in the installation<br />
directory and could not be<br />
overwritten.).<br />
115 Setup aborted: Any driver could not<br />
be preinstalled on the system. The<br />
most likely reason is that the user<br />
didn’t accepted installation of unsigned<br />
drivers.<br />
118 Setup aborted: Self-registration of<br />
some modules failed.<br />
123 Setup aborted: setup.ini is not<br />
125<br />
present or is corrupt.<br />
Setup interrupted: Installation cannot<br />
continue because of some<br />
locked resources.<br />
quired.<br />
A restart is re-<br />
Inform the user or choose another installation<br />
directory and run setup again.<br />
Inform the user or choose another installation<br />
directory and run setup again.<br />
Inform the user or choose another installation<br />
directory and run setup again.<br />
Inform the user that he should accept installation<br />
of unsigned drivers despite the<br />
system warnings and run setup again.<br />
Inform the user and abort.<br />
Provide a correct setup.ini file.<br />
Reboot the system and run installation<br />
again.<br />
10 <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong>
126 Setup aborted: Running this version<br />
of the setup application requires<br />
activation of the Demo Mode by<br />
means of the corresponding "Demo<br />
Mode Control Panel".<br />
2 Operation<br />
This code is only returned in the demo edition<br />
of the setup which is not delivered to<br />
the end user. It has not to be handled by<br />
a calling application. If the setup is executed<br />
in non-silent mode the information<br />
is displayed by a message box. Otherwise<br />
only an error entry is written to the log file<br />
of the setup in the user’s temp directory.<br />
<strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong> 11
2 Operation<br />
2.4.2 Silent Uninstallation<br />
Command Line Parameters<br />
Parameter Description<br />
/SU The setup silently uninstalls the currently installed version, if there<br />
is any.<br />
Example: setup.exe /SU<br />
Exit codes<br />
Status<br />
Code<br />
Description Solution<br />
0 The uninstallation finished success- -<br />
fully. "Successfully" means that<br />
the uninstallation is done as well as<br />
possible. The uninstaller may detect<br />
that the existing installation is corrupt<br />
(e.g., because the user deleted<br />
some installed files). This may prevent<br />
the uninstaller from performing<br />
all required steps or may even<br />
prevent the whole uninstallation in<br />
the worst case. Since neither the<br />
user nor any calling application can<br />
resolve such problems no error code<br />
is returned.<br />
100 Uninstallation aborted: Another Inform the user to close all open hardware<br />
<strong>PnP</strong> installation process is currently installation wizards. If currently no wizard<br />
running on the system.<br />
is open the system probably is performing<br />
some installation steps in the background.<br />
Just wait some time. Then run setup again.<br />
101 Uninstallation finished successfully,<br />
but a restart is required for completion.<br />
Reboot the system.<br />
102 Uninstallation aborted: The current<br />
operating system is not supported<br />
by the uninstaller.<br />
Inform the user and abort.<br />
103 Uninstallation aborted: Unexpected Inform the user and abort. The uninstaller<br />
error.<br />
creates a log file in the user’s temp directory.<br />
This file may help to analyze the<br />
104 Uninstallation aborted: The current<br />
user has no administrator privileges<br />
which are required to proceed.<br />
problem.<br />
Inform the user and abort.<br />
12 <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong>
109 Uninstallation aborted: Invalid<br />
111<br />
command line parameters.<br />
Uninstallation aborted: The in-<br />
123<br />
staller/uninstaller is already running.<br />
Uninstallation aborted: setup.ini is<br />
not present or is corrupt.<br />
126 Uninstallation aborted: Running<br />
this version of the setup application<br />
requires activation of the Demo<br />
Mode by means of the corresponding<br />
"Demo Mode Control Panel".<br />
2.5 Signing <strong>Driver</strong> Packages<br />
2 Operation<br />
Call the uninstaller with correct command<br />
line parameters.<br />
The user has to finish the running (un-) installation<br />
at first.<br />
Provide a correct setup.ini file.<br />
This code is only returned in the demo edition<br />
of the setup which is not delivered to<br />
the end user. It has not to be handled by<br />
a calling application. If the setup is executed<br />
in non-silent mode the information<br />
is displayed by a message box. Otherwise<br />
only an error entry is written to the log file<br />
of the setup in the user’s temp directory.<br />
A driver package consists of driver files (.sys), installation files (.inf) and further optional files (e.g.<br />
DLLs). To sign a driver package a catalog file (.cat) is created in the first step. This catalog file<br />
contains a hash value of each file belonging to the driver package. In the next step the catalog file is<br />
signed by means of a certificate. Either the signature is obtained from a WHQL submission (i.e. a<br />
submission to the Windows Hardware Quality Labs program of Microsoft) or by means of a vendor<br />
certificate (Authenticode). A WHQL submission is more expensive and a time-consuming process<br />
while a vendor signature can be created within seconds after you achieved a valid certificate from<br />
a certificate authority (CA). For further information please contact <strong>Thesycon</strong>.<br />
Note: Vendor signatures do not have any noteworthy impact on driver installations before Windows<br />
Vista. To enjoy the advantages of a signed driver package under Windows 2000, XP and<br />
corresponding server systems a WHQL signature has to be used instead.<br />
A signature may be required for the following reason:<br />
• Windows setup dialogs can be suppressed, i.e. it is possible to install a driver completely<br />
silent (with administrator privileges).<br />
• Windows Vista 64-bit and later 64-bit operating systems require signed driver packages (or<br />
at least signed driver files). Otherwise the drivers can be installed but are never loaded by<br />
the system.<br />
• Windows provides built-in drivers that may be compatible in some cases with the device to<br />
install (see section 4). Built-in drivers are always WHQL signed. Windows always prefer<br />
signed drivers when selecting the appropriate driver for a device. To solve this the driver<br />
package should be signed. Note: Before Windows 7 WHQL signed drivers are preferred<br />
over vendor-signed drivers according to the default system settings.<br />
<strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong> 13
3 Customization<br />
3 Customization<br />
3.1 Delivery package<br />
The <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> consists of the setup application setup.exe and the corresponding configuration<br />
file setup.ini. To create the package to be delivered to the end user, the <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong><br />
has to be customized. That means, depending on the task of the installer the configuration file<br />
setup.ini has to be adapted. Furthermore, the installer must be completed with the required driver<br />
files and optional helper files that adapt the behavior of the setup. The setup application itself is<br />
never modified. The files that complete the setup are:<br />
Required<br />
• One or more driver files (.sys) for 32-bit and/or 64-bit systems.<br />
• One or more installation files (.inf) for 32-bit and/or 64-bit systems.<br />
• One or more signed catalog files (.cat) for 32-bit and/or 64-bit systems. Catalog files are<br />
optional for some older operating systems like Windows XP. Even under Windows Vista<br />
(64-bit) and Windows 7 (64-bit) it is possible to omit them as long as the driver files (.sys)<br />
are signed. But this is not recommended. Catalog files are expected by Windows for each<br />
driver package and significantly improve the user experience during installation. Under<br />
Windows 8 (64-bit) driver packages without signed catalog files will not work.<br />
Optional<br />
• One or more COM DLLs to be registered for 32-bit and/or 64-bit systems.<br />
• The license text.<br />
• The file that contains the public (!) key of the vendor certificate used to sign the driver<br />
package.<br />
• The vendor-specific bitmap file that will be displayed by the most setup wizard pages.<br />
• Additional files that extend the driver package or the installation in general.<br />
All files together with the setup.exe and the setup.ini should be stored in the same folder. Optionally<br />
sub-folders can be used to separate files specific for 32-bit and 64-bit operating systems<br />
respectively.<br />
3.2 Installation Files (.inf)<br />
An installation file describes how a kernel driver is installed. It contains one ore more ’copy file’<br />
sections that control how specific files of the driver package are copied to the target system. These<br />
sections can contain one or more lines like this:<br />
.sys,,,0x00000004<br />
14 <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong>
3 Customization<br />
The flag 0x00000004 means COPYFLG_NOVERSIONCHECK. If this flag is set the installation<br />
can overwrite a newer version of the file without showing a warning box to the user. This is<br />
especially useful in the case of a rollback. It is strongly recommended to set this flag for all files<br />
in the copy section.<br />
3.3 <strong>Installer</strong> Configuration (setup.ini)<br />
The setup.ini file is a text-based configuration file. It can be edited with a text editor like Notepad.<br />
The file is divided into sections. A sections is marked with []. Do not change the names of the<br />
sections. Each section defines a set of parameters. Each parameter has a name and a value. Do not<br />
modify the names. Change the parameter values according to your requirements.<br />
3.3.1 [Setup]<br />
This section contains general parameter that are used for both 32-bit and 64-bit systems.<br />
CompanyName<br />
Your company name shown in the programs control panel of the system.<br />
Example: CompanyName=My Company<br />
ProductName<br />
The name of your product shown in the graphical user interface of the setup application and the<br />
programs control panel of the system.<br />
Note: The application automatically appends strings like ’Setup’ and ’Uninstall’ depending on the<br />
purpose of the dialogs. So don’t use these strings as part of the name!<br />
Example: ProductName=My Product<br />
ProductVersion<br />
The version string of your product shown in the graphical user interface of the setup application<br />
and the programs control panel of the system.<br />
Example: ProductVersion=1.6.0.0<br />
SoftwareRegPath<br />
The Registry path of the installed software. It is also used to store setup information. The path is<br />
relative to HKEY_LOCAL_MACHINE\Software.<br />
Note: This parameter must not be changed in future releases of your setup package. Otherwise the<br />
setup cannot detect whether or not another version already exists on the target system and cannot<br />
uninstall the existing version before the current package will be installed.<br />
<strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong> 15
3 Customization<br />
Note furthermore that this path must be world wide unique. To achieve this, use your company<br />
name and your product name in the path.<br />
Example: SoftwareRegPath=MyCompany\MyProduct<br />
DefaultDestDir<br />
The default destination directory on the target system. The path is relative to ’Program Files’.<br />
Note: The path must be world-wide unique. To achieve this, use your company name and your<br />
product name in the path.<br />
Example: DefaultDestDir=MyCompany\MyProduct<br />
ShowLicenseText<br />
Define whether or not a license agreement should be displayed and accepted by the user before<br />
installation begins. The license text has to be provided in a plain text file named license.txt<br />
if this option is enabled (ShowLicenseText=1). The value is either 0 or 1.<br />
The license agreement is optional.<br />
Example: ShowLicenseText=0<br />
UseCustomizedBitmap<br />
Define whether or not a customized bitmap should be displayed by the setup. The value is either<br />
0 or 1. If set to 0 the setup displays a default bitmap. If set to 1 the setup is requested to display<br />
a customized bitmap. The name of the bitmap file has to be "setup.bmp". The file is expected in<br />
the same folder as the setup application. The dimensions of the bitmap should be 164 x 314 pixels<br />
(width x height).<br />
Example: UseCustomizedBitmap=1<br />
CertificateFile<br />
The name of the file that contains the public (!) key of the vendor certificate used to sign the driver<br />
package. The certificate is installed in the ’Trusted Publisher’ store. So the user will not be asked<br />
whether or not to trust the driver publisher. After the installation completed the certificate is not<br />
required anymore and therefore removed from the certificate store.<br />
The value is optional but recommended because it suppresses some system setup dialogs.<br />
Note: This certificate is only installed under Windows Vista and newer operating systems. Otherwise<br />
the parameter is ignored.<br />
Example: CertificateFile=MyCertificate.cer<br />
16 <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong>
CopyFiles<br />
3 Customization<br />
Common files to be copied to the destination directory (e.g. ReadMe.txt). Several files may be<br />
specified as a comma separated list of file names without path. The files have to be located in the<br />
same directory like the setup application.<br />
The value is optional.<br />
Note that files specified by other parameters of this section are implicitly copied and should not be<br />
specified by this parameter.<br />
Example: CopyFiles=ReadMe.txt, RevisionHistory.txt<br />
ShortCut[1..n]<br />
Optional parameters of type ShortCutX=ValueString that define shortcuts to be created.<br />
Start with X=1 and increment X with each shortcut definition. ValueString has the following<br />
format:<br />
SC_ROOT|SC_PATH|SC_NAME|TARGET|PARAMS|START_PATH<br />
SC_ROOT Root directory of the shortcut. This directory will not be deleted during<br />
uninstallation. It can be set to the following variables:<br />
$SM_PROG_CURRENT_USER (start menu\programs of the current user)<br />
$SM_STARTUP_CURRENT_USER (start menu\startup of the current user)<br />
$SM_PROG_ALL_USERS (start menu\programs of all users)<br />
$SM_STARTUP_ALL_USERS (start menu\startup of all users)<br />
SC_PATH Optional path of the shortcut to be created. This path is relative to SC_ROOT.<br />
SC_NAME Name of the shortcut to be created.<br />
TARGET Full path and name of the executable file on the target system the shortcut<br />
points to. One of the variables $INSTDIR (main installation directory),<br />
$WINDIR (Windows directory) or $SYSDIR (system32 directory) should be<br />
used to reference the target file.<br />
PARAMS Optional parameters passed to the target executable file when it is launched.<br />
START_PATH Optional start directory for the target executable file.<br />
Example:<br />
ShortCut1=$SM_PROG_ALL_USERS|MySubDir|<strong>Manual</strong>.lnk|$INSTDIR\RefMan.pdf||<br />
ShortCut2=$SM_PROG_ALL_USERS|MySubDir|ReadMe.lnk|$INSTDIR\ReadMe.txt||<br />
3.3.2 [Setup_x86]<br />
Settings in this section will only be applied to 32-bit operating systems.<br />
<strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong> 17
3 Customization<br />
SupportedOS<br />
32-bit operating systems supported by the setup. The parameter specifies a comma-separated list<br />
that may contain the following tokens:<br />
2000, XP, Server2003, HomeServer, Vista, Server2008, 7, 8, Newer<br />
The token ’Newer’ means any 32-bit operating system newer than the latest system currently<br />
known.<br />
If the list is empty no 32-bit operating system is supported.<br />
Example: SupportedOS=XP, 7, 8, Newer<br />
CopyFiles<br />
This parameter specifies the files of the setup package to be copied to the destination directory<br />
(e.g., .sys and .cat files). Several files may be specified as a comma separated list of file names<br />
without path. If the parameter SubDir of this section is empty the files have to be located in the<br />
same directory like the setup application, otherwise they have to be located in the given sub-folder.<br />
The value is optional.<br />
Note that files specified by other parameters of this section are implicitly copied and should not be<br />
specified by this parameter.<br />
Example: CopyFiles=My<strong>Driver</strong>.sys, My<strong>Driver</strong>.cat<br />
<strong>PnP</strong><strong>Driver</strong>Inf<br />
This parameter specifies the .inf files that describe the Plug’n’Play drivers to be installed. Several<br />
files may be specified as a comma separated list of file names without path. If the parameter<br />
SubDir of this section is empty the files have to be located in the same directory like the setup<br />
application, otherwise they have to be located in the given sub-folder.<br />
Note: If multiple .inf files are specified they must not be related in a bus driver architecture (see<br />
section 4).<br />
Example: <strong>PnP</strong><strong>Driver</strong>Inf=My<strong>Driver</strong>.inf<br />
RegisterFiles<br />
COM DLLs to register. The DLLs have to support self-registration. Several files may be specified<br />
as a comma separated list of file names without path. If the key SubDir of this section is empty<br />
the files have to be located in the same directory like the setup application, otherwise they have to<br />
be located in the given sub-folder.<br />
The value is optional.<br />
Example: RegisterFiles=MyComModule.dll<br />
18 <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong>
SubDir<br />
3 Customization<br />
Sub-folder of all files listed in the section [Setup_x86]. If the parameter is empty the files have to<br />
be located in the same directory like the setup application, otherwise they have to be located in the<br />
given sub-folder. The folder will also be created on the destination system.<br />
The value is optional.<br />
Example:<br />
Location of the setup application: y:\install<br />
Installation directory: c:\Program Files\Company\Product<br />
a) SubDir=x86<br />
The files will be copied from y:\install\x86<br />
to c:\Program Files\Company\Product\x86.<br />
b) SubDir=<br />
The files will be copied from y:\install<br />
to c:\Program Files\Company\Product.<br />
ShortCut[1..n]<br />
Optional parameter of type ShortCutX=ValueString that define shortcuts to be created.<br />
Start with X=1 and increment X with each shortcut definition. ValueString has the following<br />
format:<br />
SC_ROOT|SC_PATH|SC_NAME|TARGET|PARAMS|START_PATH<br />
SC_ROOT Root directory of the shortcut. This directory will not be deleted during<br />
uninstallation. It can be set to the following variables:<br />
$SM_PROG_CURRENT_USER (start menu\programs of the current user)<br />
$SM_STARTUP_CURRENT_USER (start menu\startup of the current user)<br />
$SM_PROG_ALL_USERS (start menu\programs of all users)<br />
$SM_STARTUP_ALL_USERS (start menu\startup of all users)<br />
SC_PATH Optional path of the shortcut to be created. This path is relative to SC_ROOT.<br />
SC_NAME Name of the shortcut to be created.<br />
TARGET Full path and name of the executable file on the target system the shortcut<br />
points to. One of the variables $INSTDIR (main installation directory),<br />
$WINDIR (Windows directory) or $SYSDIR (system32 directory) should be<br />
used to reference the target file. If the parameter SubDir of this section<br />
defines a sub-folder it has to be specified too.<br />
PARAMS Optional parameters passed to the target executable file when it is launched.<br />
START_PATH Optional start directory for the target executable file.<br />
Example:<br />
<strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong> 19
3 Customization<br />
ShortCut1=$SM_STARTUP_ALL_USERS||My CPL.lnk|$INSTDIR\MyCpl.exe|-s|<br />
3.3.3 [Setup_x64]<br />
Settings in this section will only be applied to 64-bit operating systems.<br />
SupportedOS<br />
64-bit operating systems supported by the setup. The parameter specifies a comma separated list<br />
that may contain the following tokens:<br />
XP, Server2003, Vista, Server2008, 7, Server2008R2, HomeServer2011, 8, Server2012, Newer<br />
The token ’Newer’ means any 64-bit operating system newer than the latest system currently<br />
known.<br />
If the list is empty no 64-bit operating system is supported.<br />
Example: SupportedOS=7, Server2008R2, 8, Newer<br />
CopyFiles<br />
This parameter specifies the files of the setup package to be copied to the destination directory<br />
(e.g., .sys and .cat files). Several files may be specified as a comma separated list of file names<br />
without path. If the parameter SubDir of this section is empty the files have to be located in the<br />
same directory like the setup application, otherwise they have to be located in the given sub-folder.<br />
The value is optional.<br />
Note that files specified by other parameters of this section are implicitly copied and should not be<br />
specified by this parameter.<br />
Example: CopyFiles=My<strong>Driver</strong>_x64.sys, My<strong>Driver</strong>_x64.cat<br />
<strong>PnP</strong><strong>Driver</strong>Inf<br />
This parameter specifies the .inf files that describe the Plug’n’Play drivers to be installed. Several<br />
files may be specified as a comma separated list of file names without path. If the parameter<br />
SubDir of this section is empty the files have to be located in the same directory like the setup<br />
application, otherwise they have to be located in the given sub-folder.<br />
Note: If multiple .inf files are specified they must not be related in a bus driver architecture (see<br />
section 4).<br />
Example: <strong>PnP</strong><strong>Driver</strong>Inf=My<strong>Driver</strong>_x64.inf<br />
RegisterFiles<br />
COM DLLs to register. The DLLs have to support self-registration. Several files may be specified<br />
as a comma separated list of file names without path. If the key SubDir of this section is empty<br />
20 <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong>
3 Customization<br />
the files have to be located in the same directory like the setup application, otherwise they have to<br />
be located in the given sub-folder.<br />
The value is optional.<br />
Example: RegisterFiles=MyComModule.dll, MyComModule_x64.dll<br />
SubDir<br />
Sub-folder of all files listed in the section [Setup_x64]. If the parameter is empty the files have to<br />
be located in the same directory like the setup application, otherwise they have to be located in the<br />
given sub-folder. The folder will also be created on the destination system.<br />
The value is optional.<br />
Example:<br />
Location of the setup application: y:\install<br />
Installation directory: c:\Program Files\Company\Product<br />
a) SubDir=x64<br />
The files will be copied from y:\install\x64<br />
to c:\Program Files\Company\Product\x64.<br />
b) SubDir=<br />
The files will be copied from y:\install<br />
to c:\Program Files\Company\Product.<br />
ShortCut[1..n]<br />
Optional parameter of type ShortCutX=ValueString that define shortcuts to be created.<br />
Start with X=1 and increment X with each shortcut definition. ValueString has the following<br />
format:<br />
SC_ROOT|SC_PATH|SC_NAME|TARGET|PARAMS|START_PATH<br />
<strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong> 21
3 Customization<br />
SC_ROOT Root directory of the shortcut. This directory will not be deleted during<br />
uninstallation. It can be set to the following variables:<br />
$SM_PROG_CURRENT_USER (start menu\programs of the current user)<br />
$SM_STARTUP_CURRENT_USER (start menu\startup of the current user)<br />
$SM_PROG_ALL_USERS (start menu\programs of all users)<br />
$SM_STARTUP_ALL_USERS (start menu\startup of all users)<br />
SC_PATH Optional path of the shortcut to be created. This path is relative to SC_ROOT.<br />
SC_NAME Name of the shortcut to be created.<br />
TARGET Full path and name of the executable file on the target system the shortcut<br />
points to. One of the variables $INSTDIR (main installation directory),<br />
$WINDIR (Windows directory) or $SYSDIR (system32 directory) should be<br />
used to reference the target file. If the parameter SubDir of this section<br />
defines a sub-folder it has to be specified too.<br />
PARAMS Optional parameters passed to the target executable file when it is launched.<br />
START_PATH Optional start directory for the target executable file.<br />
Example:<br />
ShortCut1=$SM_STARTUP_ALL_USERS||My CPL.lnk|$INSTDIR\x64\MyCpl_x64.exe|-s|<br />
3.3.4 Examples<br />
The SDK of the <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> provides example configuration files for the demo and full<br />
versions respectively of the following <strong>Thesycon</strong> drivers:<br />
• USB CDC/ACM class driver for Windows<br />
• USB CDC/ECM class driver for Windows<br />
• USB CDC/NCM class driver for Windows<br />
• USBIO for Windows<br />
To get the examples working, the following steps are required (for test purposes only!):<br />
• Copy the setup application (setup.exe or setup_demo.exe) to an arbitrary test folder.<br />
• Copy the configuration file setup.ini from the example of interest to the same folder.<br />
• Get all files listed in the setup.ini file from the corresponding SDK of the <strong>Thesycon</strong> driver<br />
and copy them to the same folder like the setup.exe.<br />
Note: If you don’t have catalog files (.cat) when testing use the driver files (.sys) signed<br />
by <strong>Thesycon</strong>. This ensures that the drivers will also be loaded when the installation is<br />
performed under 64-bit operating systems.<br />
22 <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong>
3 Customization<br />
Under Windows 8 (64-bit) catalog files are mandatory. <strong>Driver</strong> packages without catalog files<br />
are rejected by the operating system and the setup will fail.<br />
The SDK of the USBIO driver also provides COM objects that will be registered by the<br />
setup. Please refer to the USBIO documentation how to customize USBIO COM objects<br />
and how to create the required type libraries (.tlb). Registration of the COM objects is<br />
optional. It you want to skip the registration remove the listed COM DLLs and .tlb files in<br />
the setup.ini file.<br />
• Adapt the hardware IDs of the driver installation files (.inf) to match the device to install.<br />
Note: If catalog files will be provided this step has to be done before the catalog files will<br />
be created and signed.<br />
• Copy the created package to the destination system and run the setup application.<br />
Note: The examples are only intended for demonstration. Following the few steps described<br />
above you can check the basic functionality of the <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong>. To get an impression of<br />
the optimized user guidance of the installer or of its silent mode, signed catalog files are required.<br />
If the catalog files are vendor-signed (see section 2.5) the public (!) key of the vendor certificate<br />
is also required (see parameter CertificateFile of the setup.ini file).<br />
Packages created with the example configuration files are not ready to be delivered to the end user!<br />
Please refer to the documentation of the corresponding driver SDK for further details about the<br />
steps required for a complete driver customization.<br />
The SDK of the <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> also provides a common example configuration file for an<br />
arbitrary product of an arbitrary company. The file is located in the same directory like the setup<br />
application.<br />
<strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong> 23
4 Limitations<br />
4 Limitations<br />
The <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> is suitable for installation of the most driver packages. In the following<br />
cases it cannot be used:<br />
• The driver packages contains drivers related in a bus driver architecture. This is the case if<br />
– the driver package contains a driver that creates child devices when loaded and<br />
– if the driver package also contains drivers for these created child devices.<br />
Note that installation of driver packages containing multiple .inf files (drivers) which are not<br />
related in a bus driver architecture is supported by the <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong>.<br />
• The systems contains built-in drivers that will be installed for devices that match specific<br />
conditions. These drivers are always WHQL-signed. Built-in drivers are never uninstalled<br />
by the <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong>. So after cleanup and preinstallation of the vendor driver there<br />
may be more than one matching driver preinstalled on the system. If the device is connected<br />
the system will assign the best matching driver to the device. Unfortunately, it prefers signed<br />
drivers. Additionally, before Windows 7 WHQL-signed drivers are preferred over vendorsigned<br />
drivers according to the default system settings. So the driver provided with the <strong>PnP</strong><br />
<strong>Driver</strong> <strong>Installer</strong> may be preinstalled on the system but will not be loaded for the device. If<br />
it is not possible to provide the driver package with an appropriate signature the <strong>PnP</strong> <strong>Driver</strong><br />
<strong>Installer</strong> is not suitable in this case.<br />
Note: If the limitations prevent the usage of the <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> a specific driver installer can<br />
solve this problem. Please contact <strong>Thesycon</strong> for further information.<br />
24 <strong>PnP</strong> <strong>Driver</strong> <strong>Installer</strong> <strong>Reference</strong> <strong>Manual</strong>