通过.inf程序化驱动程序安装导致重新启动 [英] Programmatic driver install via .inf causing reboot

查看:519
本文介绍了通过.inf程序化驱动程序安装导致重新启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用此命令通过inf文件安装驱动程序:

  rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 .\my_driver.inf 

根据MSDN( http://msdn.microsoft.com/en-us/library/aa376957%28v=vs .85%29.aspx ),通过将128作为参数,除了将安装的默认路径设置为INF的位置,这是典型的设置,安装应该(+0)不要求用户重新启动。

解决方案



/ div>

使用 advpack.dll 而不是 setupapi.dll



  rundll32.exe advpack.dll,LaunchINFSection inf filename [,section name] [,flags] [,smart reboot] 

使用setupapi.dll重新启动似乎是 SETUPAPI.DLL的128值的常见问题

示例



  rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 .\my_driver.inf 

rundll32.exe advpack.dll,LaunchINFSection .\my_driver.inf ,, 3,N

这些命令应该以类似的方式操作。他们将调用.inf文件的DefaultInstall部分。



参考




I'm trying to install a driver via an inf file using this command:

rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 .\my_driver.inf

According to MSDN (http://msdn.microsoft.com/en-us/library/aa376957%28v=vs.85%29.aspx), by suplying 128 as the parameter, apart from "Set the default path of the installation to the location of the INF. This is the typical setting", the install should (+0) not ask the user for a reboot. However, in my case, it always does.

What am I doing wrong?

解决方案

Use advpack.dll instead of setupapi.dll

rundll32.exe advpack.dll,LaunchINFSection inf filename[,section name][,flags][,smart reboot]

The reboot with setupapi.dll seems to be a common problem with the 128 value for SETUPAPI.DLL from what I saw on a web search.

Example

rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 .\my_driver.inf

rundll32.exe advpack.dll,LaunchINFSection .\my_driver.inf,,3,N

These commands should both operate in a similar fashion. They will both invoke DefaultInstall section of the .inf file.

References

这篇关于通过.inf程序化驱动程序安装导致重新启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆