and here different version.
note, this version does not write the file but outputs it.
with IE-com you are able to view the data without SP2 blocking it.

Code:
$header=@wksta,"",""
$HD="1","Model=IBM-DJSA-210","Interface=IDE","Size=10GB"
$HD2="2","Model=COM-CO10-JA0","Interface=SCSI","Size=9GB"
$OS="Operating System","Name=Windows 2000","Service Pack=4","Role=workstation","language=finnish"
$Antivir="Antivirus","Name=Fsecure AV","version=5.52","defTimeStamp=23.10.2004_03"
$services="Services",
"Alerter=Hälytys=C:\WINNT\System32\services.exe=Manual=Stopped=LocalSystem",
'Apache2=Apache2="C:\Program Files\Apache Group\Apache2\bin\Apache.exe" -k runservice=Manual=Stopped=LocalSystem',
"AppMgmt=Sovellusten hallinta=C:\WINNT\system32\services.exe=Manual=Stopped=LocalSystem",
"aspnet_state=ASP.NET State Service=C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet_state.exe=Manual=Stopped=.\ASPNET",
"BackWeb Client - 7681197=F-Secure Automatic Update=C:\PROGRA~1\F-Secure\BackWeb\7681197\Program\SERVIC~1.EXE=Auto=Stopped=LocalSystem",
"BITS=Background Intelligent Transfer Service=C:\WINNT\System32\svchost.exe -k BITSgroup=Manual=Stopped=LocalSystem",
"Browser=Tietokoneiden selaus=C:\WINNT\System32\services.exe=Auto=Running=LocalSystem",
"cisvc=Indeksointipalvelu=C:\WINNT\System32\cisvc.exe=Disabled=Stopped=LocalSystem",
"ClipSrv=Leikekirja=C:\WINNT\system32\clipsrv.exe=Manual=Stopped=LocalSystem",
"Dhcp=DHCP-asiakas=C:\WINNT\System32\services.exe=Auto=Running=LocalSystem",
"dmadmin=Loogisen levyn hallinnan valvontapalvelu=C:\WINNT\System32\dmadmin.exe /com=Manual=Stopped=LocalSystem"

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

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

$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.menubar = 1
$ie.statusbar = 0
$ie.toolbar = 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;" onclick="var sauna = document.getElementById(' + "'" + $data[0] + "'"
+ "); if (sauna.style.display == 'none') { sauna.style.display = 'block'; } else { sauna.style.display = 'none'; }"
+ '"><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],"=")
$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

_________________________
!

download KiXnet