欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

VBScript根據(jù)盤符找設(shè)備名的代碼

 更新時間:2013年07月28日 18:41:55   作者:  
這篇文章主要介紹了vbs下通過盤符找設(shè)備名的實現(xiàn)代碼,需要的朋友可以參考下
復制代碼 代碼如下:

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery( _
    "associators of {win32_logicaldisk.deviceid='G:'} WHERE ResultClass=Win32_DiskPartition")
For Each objItem in colItems
 TargetIndex = objItem.DiskIndex
 Set Items = objWMIService.ExecQuery( _
  "SELECT * FROM Win32_DiskDrive Where DeviceID Like '%" & objItem.DiskIndex & "'",,48)
 For Each Item in Items
  Wscript.Echo "Model: " & Item.Model
 Next

Next

相關(guān)文章

最新評論