The LaunchINFSectionEx function in the Advanced INF Installer can be used to launch an advanced INF section with SAVE/ROLLBACK capabilities. It can be called through rundll32.exe from command line.
HRESULT WINAPI LaunchINFSectionEx( HWND hwnd, HINSTANCE hInstance, PSTR pszParms, INT nShow );
rundll32.exe advpack.dll,LaunchINFSectionEx inf_filename,[section name],[cab name],<flags>[,smart reboot]
INF filename you want to launch. If the given name is not full pathname, advpack.dll will extract the INF from the given CAB file.
INF install section name you want to launch. If it is empty string or NULL, DefaultInstall section name will be called.
Specify the fully qualified CAB file pathname which contains the files or INF you want to install to the user's system.
Flag | Meaning |
---|---|
4 | Quiet Mode, no UI |
8 | Don't Run GrpConv |
16 | Force Self-Updating on User's System |
32 | Backup Data Before Install |
64 | Rollback to Previous State |
128 | Validate the Backup Data |
256 | Complete Rollback to Previous State |
512 | Force Delay of OCX Registration |
N | No Reboot |
---|---|
A | Always Reboot |
I | Reboot if Needed (default value) |
This means to extract myinf.inf file from c:\temp\mydata.cab file and launch myinf.inf with DefaultInstall section in Quiet|Backup install mode, reboot if needed.
rundll32.exe advpack.dll,LaunchINFSectionEx c:\windows\inf\myinf.inf,,,256
This means to rollback to the state before installing myinf.inf DefaultInstall section.
For more information about LaunchINFSectionEx and Advpack.DLL, see advpub.h.