I feel pretty stupid now.
Here is the corrected code.. You need to insure the computer is awake and ready, right?
Note: the $ip[1] check.
Code:
cls
break on
;DIM $oxl,$Row,$b,$ip,$make,$model,$sn,$cs,$mm,$mt,$,$u
;$rc=SETOPTION('Explicit','On')
;$rc=SETOPTION('NoVarsInStrings','On')
$oXL=Createobject('Excel.application')
;Check to insure that Excel is available
IF 0<>@error ?@error ' Excel Application is not found'
SLEEP 4
RETURN
ENDIF
$Rc=$oXL.workbooks.open(@scriptdir+'\Altiris.xls')
$Row=1 ;Row to start at using column headings, change to 0, if needed
WHILE $oXL.cells($Row,1).value<>'' ;need a value each time in column 1
$Row=$Row+1
IF $oXL.cells($Row,1).value='' ;Once it gets to a blank row...
$oXL.quit ;quit Excel
$oXL=0 ;set the object to 0
ELSE
$b=$oXL.cells($Row,1)
$ip=WSHPing($b)
IF $ip[1]>0
$u=WMIQuery("username","Win32_ComputerSystem",$b)
$make=WMIQuery("Manufacturer","Win32_ComputerSystem",$b)
$model=WMIQuery("Model","Win32_ComputerSystem",$b)
$sn=WMIQuery("SerialNumber","Win32_BIOS",$b)
$cs=WMIQuery("CurrentClockSpeed","Win32_Processor",$b)
$mm=WMIQuery("MonitorManufacturer","Win32_DesktopMonitor",$b)
$mt=WMIQuery("MonitorType","Win32_DesktopMonitor",$b)
?$b
?$ip[0]
?$u[0]
?$make[0]
?$model[0]
?$sn[0]
?$cs[0]
?$mm[0]
?$mt[0]
ENDIF
ENDIF
LOOP
?'process is complete'
get $
Kent