strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_DiskDrive")
For Each objDiskDrive in colSettings
i=i+1
Next
WScript.Echo "There are " & i & "hard disk drives in system"
Сейчас этот форум просматривают: Google-бот и гости: 182