SetupUninstallOEMInf function

[This function is available for use in the operating systems indicated in the Requirements section. It may be altered or unavailable in subsequent versions. SetupAPI should no longer be used for installing applications. Instead, use the Windows Installer for developing application installers. SetupAPI continues to be used for installing device drivers.]

The SetupUninstallOEMInf function uninstalls a specified .inf file and any associated .pnf file. If the .inf file was installed with a catalog for signing drivers, the catalog is also removed. A caller of this function must have administrative privileges, otherwise the function fails.

Syntax


BOOL SetupUninstallOEMInf(
  _In_ PCWSTR InfFileName,
  _In_ DWORD  Flags,
  _In_ PVOID  Reserved
);

Parameters

InfFileName [in]

File name, without path, of the .inf file in the Windows Inf directory that is to be uninstalled.

Flags [in]

This parameter can be set as follows.

FlagMeaning
SUOI_FORCEDELETE
0x0001

The SetupUninstallOEMInf function first checks whether there are any devices installed using the .inf file. A device does not need to be present to be detected as using the .inf file.

If this flag is not set and the function finds a currently installed device that was installed using this .inf file, the .inf file is not removed.

If this flag is set, the .inf file is removed whether the function finds a device that was installed with this .inf file.

Note  This flag only applies to x86, amd64, and ia64 architectures.  It is ignored on all other architectures.
 
Note  If the driver package has any files that are copied to a DestinationDir that uses a dirid of 13, then this force flag is ignored.
 

 

Reserved [in]

Set to null.

Return value

TRUE

The function succeeded.

FALSE

The function failed. For extended error information, call GetLastError.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Setupapi.h

Library

Setupapi.lib

DLL

Setupapi.dll

Unicode and ANSI names

SetupUninstallOEMInfW (Unicode) and SetupUninstallOEMInfA (ANSI)

See also

Overview
Functions
SetupCopyOEMInf

 

 

Show: