如何在InstallShield加插安装驱动程序

发布网友

我来回答

1个回答

热心网友

如果你有了驱动文件inf和sys,在installshield2009sp1里面用脚本安装驱动非常简单:

1、安装installshield2009sp1,安装时选择把中文简体作为默认输出语言
2、打开installshield2009sp1,点击create a new project,选择installscript project,修改project name(项目名称)我的是“USB-Probe驱动安装”,location(存放位置),然后点ok,会出现project assistant助手的介绍,不用理会直接点下一步,修改你的软件信息(安装文件显示的)我的company name“VS”specify your application name“Probe驱动程序”然后是版本和web address “”,点击下一步,安装风格修改,可以不用理会直接下一步,
3、一直点下一步,一直选择no,直到build installation,选择singe executable,然后点击build installation ,查看结果SINGLE_EXE_IMAGE - 0 error(s), 0 warning(s),是不是没有错误,
4、在application data里面找到files and folders里面的application target folder删除defaultcomponent
右键点windows 新建folder名字改成system32,然后在destination computer's files里面点右键选add,然后浏览选中xxx.inf和xxx.sys,点打开
5、在installation designer里面找到behavior and logic里面的installscript,点击setup.rul,在文件的结尾加上以下代码即可

function OnFirstUIAfter()
begin

LaunchAppAndWait(WINSYSDIR^"\\devcon.exe", "install C:\\WINDOWS\\system32\\xxx.infUSB\\\VID_0711&PID_0250", WAIT);
DeleteFile ( "C:\\WINDOWS\\system32\\xxx.sys" );
DeleteFile ( "C:\\WINDOWS\\system32\\xxx.inf" );

return 0;
end;
其中usb\\\vid_0711&pid_0250 是我的设备id,修改成你自己的,xxx.inf 也修改成你自己的。
脚本修改完毕
6、按F7,build single_exe_image,安装程序制作完毕,运行image 里面的setup即可安装你的驱动了。

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com