通过VBS获取磁盘剩余空间

get disk free space

 

strComputer = "."
Set objWMIService = GetObject("winmgmts://" & strComputer & "/root/cimv2")
Set colDisks = objWMIService.ExecQuery ("Select * from Win32_LogicalDisk Where DeviceID = 'C:'")
For Each objDisk in colDisks
 print objDisk.FreeSpace
Next

你可能感兴趣的:(vbs,vbs,磁盘空间)