首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

Install Shield程序中检测USB设备!该怎么解决

2012-01-10 
Install Shield程序中检测USB设备!请教InstallShield达人:小弟要在InstallShield程序中检测某USBdevice是

Install Shield程序中检测USB设备!
请教Install   Shield达人:
小弟要在InstallShield程序中检测某USB   device是否接上,能够做到么?   怎么做?   是否要用到Windows   API,怎么用?   指点下,谢谢!
我用的是Install   Shield   Professional   --   standard   Edition   Version   6.22!

[解决办法]
我打包的时候,还没有遇到这种功能,关注顶起。
[解决办法]
另外写一个程序 用于检测usb(非窗体形式) 然后在is中调用 该程序
还未用is做此功能。
[解决办法]
顶,我也想知道
[解决办法]
看看这个行不
Sub Command1_Click()
strComputer = ". "
Set objWMIService = GetObject( "winmgmts:\\ " & strComputer & "\root\cimv2 ")
Set colDevices = objWMIService.ExecQuery( "Select * From Win32_USBControllerDevice ")
For Each objDevice In colDevices
strDeviceName = objDevice.Dependent
MsgBox strDeviceName
strQuotes = Chr(34)
strDeviceName = Replace(strDeviceName, strQuotes, " ")
arrDeviceNames = Split(strDeviceName, "= ")
strDeviceName = arrDeviceNames(1)
Set colUSBDevices = objWMIService.ExecQuery _
( "Select * From Win32_PnPEntity Where DeviceID = ' " & strDeviceName & " ' ")
For Each objUSBDevice In colUSBDevices
Debug.Print objUSBDevice.Description
Next
Next
End Sub
[解决办法]
zsj1101(江南神探) 的这个行。

注意在98下需要安装WMI才行。

热点排行