Disk drive info

February 21, 2009 by admin  
Filed under VBScript

Set objWMIService = GetObject(”winmgmts:”)
Set objLogicalDisk = objWMIService.Get(”Win32_LogicalDisk.DeviceID=’c:’”)
Wscript.Echo  “Total Size ” & objLogicalDisk.sIZE & ” bytes” & vbCrLF & _
“Free space is ” & objLogicalDisk.FreeSpace & ” bytes” & vbCrLF & _
“FileSystem is ” & objLogicalDisk.FileSystem

Related posts:

  1. Get disk info using VBScript and the FSO Get disk info using VBScript and the FSO Set objFso...
  2. free disk space This example shows how to display the free disk space,...
  3. free disk space, wmi version free disk space, wmi version with C Sharp using System;using...
  4. bytes to whatever Function SetBytes(Bytes) As String On Error GoTo errorhandler If Bytes...
  5. Hard Disk size using WMI This example will display the size of your hard disk...

Related posts brought to you by Yet Another Related Posts Plugin.

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!