k, doc...
here is one more, with little bit more listing...
oh, and if someone else wants to barf, just shoot.

btw, added some real info collection to see how it works on "non-managed" input.
Code:

$header=@wksta,"",""
$HD="1","Model"+chr(1)+"IBM-DJSA-210","Interface"+chr(1)+"IDE","Size"+chr(1)+"10GB"
$HD2="2","Model"+chr(1)+"COM-CO10-JA0","Interface"+chr(1)+"SCSI","Size"+chr(1)+"9GB"
$OS="Operating System","Name"+chr(1)+"Windows 2000","Service Pack"+chr(1)+"4","Role"+chr(1)+"workstation","language"+chr(1)+"finnish"
$Antivir="Antivirus","Name"+chr(1)+"Fsecure AV","version"+chr(1)+"5.52","defTimeStamp"+chr(1)+"23.10.2004_03"
$services="Services",""
$services[1]=listServices(".")
$processes="Processes",""
$processes[1]=listServices(".")


$Hardware="Hardware",""
$Harddrives="Harddrives","",""
$Harddrives[1]=$hd
$Harddrives[2]=$hd2
$Hardware[1]=$harddrives

$software="Software","","","",""
$software[1]=$os
$software[2]=$antivir
$software[3]=$services
$software[4]=$processes

$header[1]=$hardware
$header[2]=$software

;$=open(1,@scriptdir+'\testoutput2.htm',5)
;writeline(1,buildHTMLtree($header))
;$=close(1)
;run 'explorer "'+@scriptdir+'\testoutput2.htm"'

$ie = CreateObject("internetexplorer.application")
$ie.fullscreen = 1
$ie.navigate("about:blank")
While $ie.busy AND $ie.readystate <> 4 AND @error = 0 Loop
$ie.document.write('<span style="position:absolute;right:10;cursor:pointer;" onclick="window.close()">Close</span>')
$ie.document.write(buildHTMLtree($header))
$ie.visible = 1


function buildHTMLtree($data)
if 8<>vartype($data[0]) exit 1 endif
$buildHTMLtree='<span style="cursor:pointer;" id="s_' + $data[0] + '" onclick="var sauna = document.getElementById('
+"'"+$data[0]+"'"+"); var s2 = document.getElementById('s_"+$data[0]+"'); if (sauna.style.display == 'none')"
+" { sauna.style.display = 'block'; s2.innerHTML='- <b>"+ $data[0] + "</b>'; } else { sauna.style.display = 'none'; "
+"s2.innerHTML='+ <b>"+ $data[0] + "</b>';}" + '">+ <b>' + $data[0] + '</b></span><table id="' + $data[0] + '" style="display:none;"><tr><td width="20">&nbsp;</td><td>'
for $section=1 to ubound($data)
if 0<ubound($data[$section])
if 8<>vartype($data[$section][1])
$buildHTMLtree=$buildHTMLtree+BuildHTMLtree($data[$section])
else
$buildHTMLtree=$buildHTMLtree+'<b>'+$data[$section][0]+'</b>'+
'<table><tr><td width="20"></td><td><table bgcolor="#EEEEEE">'
$bg=0
for $value=1 to ubound($data[$section])
$bg=$bg+1
$=split($data[$section][$value],chr(1))
$buildHTMLtree=$buildHTMLtree+'<tr '+iif($bg/2*2=$bg,'bgcolor="#FFFFFF"','')+'><td></td>'
for each $s in $ $buildHTMLtree=$buildHTMLtree+'<td>'+$s+'</td>' next
$buildHTMLtree=$buildHTMLtree+'</tr>'
next
$buildHTMLtree=$buildHTMLtree+'</table></td></tr></table>'
endif
endif
next
$buildHTMLtree=$buildHTMLtree+'</td></tr></table><br>'
endfunction

Function ListServices($Computer)
Dim $Service,$SL
For Each $Service In GetObject('winmgmts:{impersonationLevel=impersonate}!//' + $Computer + '\root\cimv2' ).ExecQuery('select * from Win32_Service', , 48)
$SL = $SL + chr(2) + $Service.Name + CHR(1) + $Service.DisplayName + CHR(1) + $Service.PathName + CHR(1) +
$Service.StartMode + CHR(1) + $Service.State + CHR(1) + $Service.StartName
Next
$ListServices=split($SL,chr(2))
EndFunction

Function ListProcess($Computer)
Dim $Process, $PL
For Each $Process In GetObject("winmgmts:{impersonationLevel=impersonate}!//" + $Computer ).ExecQuery("select * from Win32_Process")
If $Process.ExecutablePath = '' $Process.ExecutablePath = 'Path Unknown' EndIf
$PL = $PL + chr(2) + $Process.Name + CHR(1) + $Process.ProcessId + CHR(1) + $Process.ExecutablePath
Next
$ListProcess=split($PL,chr(1))
EndFunction

_________________________
!

download KiXnet