Check this out.

 

http://www.microsoft.com/technet/scriptcenter/guide/sas_fsd_dzbl.mspx?mfr=tr
ue 

 

 

From: Joseph L. Casale [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2008 12:58 PM
To: NT System Admin Issues
Subject: VBScript Issue

 

I am trying to monitor the disc space on a specific drive, I am using:

 

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")

Set colDisks = objWMIService.ExecQuery("SELECT * FROM Win32_LogicalDisk
Where DeviceID = 'L:'", "WQL", wbemFlagReturnImmediately +
wbemFlagForwardOnly)

 

but this returns an array (right) even though its filtered to only return
one object. How can I rewrite this to return an object so that I can call
this multiple times getting the value at the point in time without needed to
deal with like an array and loop through all "one" objects in it?

 

Thanks!
jlc

 

 

 

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to