Sample scripts


Storage
   Disk Drives and Volumes
       List Available Disk Space , WMI

' List Available Disk Space


Const HARD_DISK = 3

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colDisks = objWMIService.ExecQuery _
("Select * from Win32_LogicalDisk Where DriveType = " & HARD_DISK & "")

For Each objDisk in colDisks
Wscript.Echo "DeviceID: "&; vbTab & objDisk.DeviceID
Wscript.Echo "Free Disk Space: "&; vbTab & objDisk.FreeSpace
Next


VbsEdit includes all these samples!


This package includes VbsEdit 32-bit, VbsEdit 64-bit, HtaEdit 32-bit and HtaEdit 64-bit.
The evaluation version never expires.




Home  

Copyright © 2001-2016 Adersoft