在cmd中输入RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection
关于参数问题请参阅
http://msdn.microsoft.com/en-us/aa376957%28VS.85%29.aspx
就拿这个例子来讲
RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 C:\WINDOWS\INF\SHELL.INF
“DefaultInstall” 和“132”是怎么来的呢?
Value Description
0 System provided INF.
128 Set the default path of the installation to the location of the INF. This is the typical setting.
+0 Never reboot the computer.
+1 Reboot the computer in all cases.
+2 Always ask the users if they want to reboot.
+3 Reboot the computer if necessary without asking user for permission.
+4 If a reboot of the computer is necessary, ask the user for permission before rebooting.
明显132=128+4,也就是说,如果必须要重启,则先询问。
至于DefaultInstall,应该是inf里面的节,用记事本打开看看有没有[DefaultInstall]就知道了。