Archive: Pre-packed CABs


Pre-packed CABs
Background:
I have a Visual Basic application that I need to package. I have downloaded the latest Service Pack (SP6), which includes the latest runtime redistributable, and have included that in my package. I need to install the RichTexbox control and would like to include the pre-packaged version included with SP6.

Issue:
The control is pre-packaged in a .cab. I don't know how to get it to install itself in this format. I have opened up the .cab and I see it contains the .ocx and an .inf file. This .inf file has all the instructions needed to install itself.

Is there a way for NSIS to install these pre-bundled controls?

Thanks.


You can call InstallHinfSection from SetupAPI.dll to install the INF. Use the System plug-in to do it:

StrCpy $0 'DefaultInstall 132 "path to inf"'
System::Call "setupapi::InstallHinfSectionA(i $HWNDPARENT, i 0, t r0, i 0)"