通过.inf程序化驱动程序安装导致重新启动 [英] Programmatic driver install via .inf causing reboot
问题描述
我尝试使用此命令通过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部分。
参考
- Run32.dll - http://ss64.com/nt/rundll32.html li>
- InstallHinfSection - http://msdn.microsoft.com/en-us/library/aa376957(v=vs.85).aspx
- AdvPack.dll - http://www.mdgx.com/INF_web/advpack.htm
- LaunchINFSection - http://www.mdgx.com/INF_web/launch .htm
- LaunchINFSectionEx - http: //www.mdgx.com/INF_web/launchex.htm
- LaunchINFSection - http://msdn.microsoft.com/en-us/library/gg441316(v=vs.85).aspx
- LaunchINFSectionEx - http://msdn.microsoft.com/en-us/library/aa768006(v=vs.85).aspx
- 同意问题 - http://www.911cd.net/forums/lofiversion/index。 php / t15353.html
- 类似问题 - http://www.msfn.org/board/topic/104891-how-can-i-install-a -inf-file-from-the-command-line /
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
- Run32.dll - http://ss64.com/nt/rundll32.html
- InstallHinfSection - http://msdn.microsoft.com/en-us/library/aa376957(v=vs.85).aspx
- AdvPack.dll - http://www.mdgx.com/INF_web/advpack.htm
- LaunchINFSection - http://www.mdgx.com/INF_web/launch.htm
- LaunchINFSectionEx - http://www.mdgx.com/INF_web/launchex.htm
- LaunchINFSection - http://msdn.microsoft.com/en-us/library/gg441316(v=vs.85).aspx
- LaunchINFSectionEx - http://msdn.microsoft.com/en-us/library/aa768006(v=vs.85).aspx
- Same Issue - http://www.911cd.net/forums/lofiversion/index.php/t15353.html
- Similar Issue - http://www.msfn.org/board/topic/104891-how-can-i-install-a-inf-file-from-the-command-line/
这篇关于通过.inf程序化驱动程序安装导致重新启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!