Hi all,
I would like to insatll an inf file,
trying to use the following code just didn't help:
".....
szProgram = "rundll32.exe";
szCmdLine = "setupapi.dll,InstallHinfSection DefaultInstall 132" + SUPPORTDIR + "test.inf";
LaunchAppAndWait(szProgram, szCmdLine, WAIT);
...."
what does the parameter DefaultInstall refer to ?
mybe there is onther function that can be used, such as
SetupCopyOEMInf(....) ?
THANKS
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Installing an inf file
Started by
talzur
, Jul 26 2005 17:19
2 replies to this topic
Posted 26 July 2005 - 22:04
That method will only work if your INF file includes a DefaultInstall section. Are you trying to install a device driver? These INFs usually don't have an DefaultInstall section and you must use a different method to install them. If your InstallShield version has a Device Driver Wizard then you could use this. Otherwise look at the samples "Install a Windows Shell INF File" and "Install a Plug&Play Device Driver INF File" at http://www.installsi.../en/isp_ext.htm
Stefan Krüger
InstallSite.org twitter facebook
Posted 28 July 2005 - 05:40
Hi all,
The solution is as follows:
// declaration...
prototype BOOL Setupapi.SetupCopyOEMInfA(POINTER, POINTER, POINTER, POINTER, POINTER, POINTER, POINTER, POINTER);
STRING SourceInfFileName;
/* you first need to copy your inf and other install files to targetdir. If you setup the following code in say OnFirstUIAfter() function and use natural file copying of installshield and setup file goups etc, then you need to do this somewhere after the file copy in your script code... thats why OnFirstUIAfter()*/
SourceInfFileName = TARGETDIR ^ "X.inf"; // where x is your inf
UseDLL("Setupapi.dll");
nResult = SetupCopyOEMInfA(&SourceInfFileName, NULL, 1, NULL, NULL, 0, NULL, NULL);
UnUseDLL("Setupapi.dll");
The solution is as follows:
// declaration...
prototype BOOL Setupapi.SetupCopyOEMInfA(POINTER, POINTER, POINTER, POINTER, POINTER, POINTER, POINTER, POINTER);
STRING SourceInfFileName;
/* you first need to copy your inf and other install files to targetdir. If you setup the following code in say OnFirstUIAfter() function and use natural file copying of installshield and setup file goups etc, then you need to do this somewhere after the file copy in your script code... thats why OnFirstUIAfter()*/
SourceInfFileName = TARGETDIR ^ "X.inf"; // where x is your inf
UseDLL("Setupapi.dll");
nResult = SetupCopyOEMInfA(&SourceInfFileName, NULL, 1, NULL, NULL, 0, NULL, NULL);
UnUseDLL("Setupapi.dll");