这些资料你看看,上次看到别人讨论的:
可以在安装脚本中通过调用LaunchAppAndWait函数启动一个命令行方式实现:
Windows 9x
Rundll.exe setupx.dll,InstallHinfSection DefaultInstall 132 %1
Windows NT/2000
Rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 132 %1
%1 是 .inf 文件名
下面给出例子:
Windows 9x
szProgram = "rundll.exe";
szCmdLine = "setupx.dll,InstallHinfSection DefaultInstall 132 "
+ SUPPORTDIR + "test.inf";
LaunchAppAndWait(szProgram, szCmdLine, WAIT);
Windows NT / 2000
szProgram = "rundll32.exe";
szCmdLine = "setupapi.dll,InstallHinfSection DefaultInstall 132? + SUPPORTDIR + "test.inf";
LaunchAppAndWait(szProgram, szCmdLine, WAIT);