InstallShield 2016 » InstallScript Language Reference
Project • This function applies to InstallScript projects only. This function is not required in InstallScript MSI projects since DIFx can be called by the Windows Installer in those projects.
The DIFxDriverPackagePreinstall function preinstalls a driver package for a Plug and Play (PnP) function driver in the driver store and installs the .inf file for the driver package in the system .inf file directory. If all of the files associated with the driver are in a single component or you can guarantee that all appropriate driver files will be installed when this component’s Installed event is called, then the recommended place for calling this function is in the component containing the DIFx driver's Installed event. Otherwise, call this function in the installation’s OnMoved event.
If uninstall logging is enabled when this function is called, the driver pre-installed by this function is logged for uninstallation and is automatically removed by the OnUninstallingDIFxDriverFile event when the application is removed.
Note • This function calls the DIFxAPI function DriverPackagePreinstall. See the DIFxAPI documentation for additional details regarding this function and its parameters and return values.
Syntax
DIFxDriverPackagePreinstall( byval string szDriverPackageInfPath, byval number nFlags, byval number nISFlags );
Parameters
Parameter |
Description |
|||||||||||||||
szDriverPackageInfPath |
String that supplies the fully qualified path to the driver package .inf file of the driver package to pre-install. |
|||||||||||||||
nFlags |
One or more flags that control the installation operation. In most cases, specify 0 to have the installer automatically add the appropriate flags. The following additional flags can be specified manually: Note • These flags are defined by and passed directly to the Flags parameter of the DIFxAPI function DriverPackagePreinstall. See the DIFxAPI documentation for additional information regarding these flags.
|
|||||||||||||||
nISFlags |
Specifies InstallScript-specific flags. The following flags are available:
|
Return Values
Return Value |
Description |
ISERR_SUCCESS |
The function was successful. |
< ISERR_SUCCESS |
The function failed. If the return value from DriverPackagePreinstall is a Win32 error (a positive return value), ISERR_WIN_BASE is added to the error to ensure that it is < ISERR_SUCCESS. You can use the following code to get the original Win32 error, if desired: if( nResult & ISERR_WIN_BASE ) then nResult = nResult - ISERR_WIN_BASE; endif; For a list of specific errors, see DIFxAPI Errors (InstallScript Projects). |
Additional Information
For more information on DIFx and DIFxAPI, see the MSDN Library.
InstallShield 2016 Help LibraryMay 2017 |
Copyright Information | Flexera Software |