LaunchINFSection function

Launches a portion of an information (.inf) file.

Syntax

int WINAPI LaunchINFSection(
   HWND      hwndOwner,
   HINSTANCE hInstance,
   PSTR      pszParams,
   INT       nShow
);

Parameters

hwndOwner

HWND that specifies the owner window on which to display error messages. This parameter is typically NULL, which causes the desktop to be the owner window.

hInstance

Handle to the instance of the program. This parameter is typically NULL.

pszParams

Comma-delimited string that specifies the following in the order listed.

  1. The .inf file. If you do not specify the fully qualified path of the .inf file, the .inf file is extracted from the .cab file specified below.
  2. The section of the .inf file to launch. If you do not specify a section then the DefaultInstall section of the .inf file is launched.
  3. The fully qualified path of a cabinet file (.cab) that contains the .inf file.
  4. Flags that specify the installation mode.

The following flags are used to specify the installation mode.

LIS_QUIET (0x0001)

Quiet mode, no UI.

LIS_NOGRPCONV (0x0002)

Don't run GrpConv.

nShow

Not used.

Return value

Returns one of the following values.

Return code Description

The section launched successfully.

1

The section failed to launch.

 

Remarks

You can call this function using Rundll32.exe from the command line.

Note  Using an entry point function with Rundll32.exe does not resemble a normal function call. The function name and the name of the .dll file where it is stored are used only as command line parameters. The function definition shown in the Syntax section of this topic is only a standard prototype for all functions that you can call using Rundll32. The specific values for hwndOwner and hInstance are not provided by the user, but are handled behind the scenes by Rundll32.

 

Examples

The following examples demonstrate how to call the LaunchINFSection function using Rundll32.

This example demonstrates how to extract the myinf.inf file from the c:\temp\mydata.cab file in Quiet|Backup mode, launch the DefaultInstall section, and reboot if needed.

rundll32.exe advpack.dll,LaunchINFSection myinf.inf,,c:\temp\mydata.cab,36

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

N/A

DLL

Advpack.dll

See also

Conceptual

About INF File Architecture

Using INF Files