|
|
楼主 |
发表于 2008-3-21 19:20:28
|
显示全部楼层
Const HKEY_LOCAL_MACHINE = &H80000002
strKeyRoot = HKEY_LOCAL_MACHINE
Regpath = "HKEY_LOCAL_MACHINE"
strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}"
objRegistry.EnumKey strKeyRoot, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
aKeyPath=strKeyPath&"\"&subkey
objRegistry.EnumValues HKEY_LOCAL_MACHINE, aKeyPath, arrValueNames
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,aKeyPath,"InfSection",strValue
Wscript.Echo strValue
if StrComp(arrValueNames(i),"InfSection",1) = 0 Then InfSection=strValue
Next
Wscript.Echo InfSection
我之前早就测试了截取注册表InfSection安装节点 rundll32能安装能CopyFiles,所有都成功结果硬件还是没有安装成功。上面的是我的测试代码的其中一段,你自己玩玩吧 |
|