Click to See Complete Forum and Search --> : vbscript and ExecQuery


pelegk1
07-14-2003, 08:41 AM
i am running this code in an html page under
<script language="vbscript">
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select PrinterStatus from Win32_Printer Where Name='" & defaultPrinterName & "'",,48)
</script>
i want to check the result that i get in colItems ,but the only way i found out how to do this is using a "for each" loop
while i want to access directly to the value i have recived!!!
how to do it?
thanks in advance
Peleg