$rc = Open(1, "\\SERVER\public\IS\kixtartlogs\"+ @WKSTA+".html", 5)
$wmiColl1 = GetObject("WinMgmts:root/cimv2").ExecQuery("Select * FROM Win32_ComputerSystem ")
$wmiColl2 = GetObject("WinMgmts:root/cimv2").ExecQuery("Select * FROM Win32_BIOS ")
$wmiColl3 = GetObject("WinMgmts:root/cimv2").ExecQuery("Select * FROM Win32_Printer ")
$rc = WriteLine(1, "<HTML>")
$rc = WriteLine(1, "<BODY>")
$rc = WriteLine(1, "<center>")
$rc = WriteLine(1, "<table border=1>")
$rc = WriteLine(1, "<tr>")
$rc = WriteLine(1, " <th>Full Name</th>")
$rc = WriteLine(1, " <th>UserID</th>")
$rc = WriteLine(1, " <th>IP Address</th>")
$rc = WriteLine(1, " <th>Make</th>")
$rc = WriteLine(1, " <th>Model</th>")
$rc = WriteLine(1, " <th>Serial Number</th>")
$rc = WriteLine(1, " <th>Default Printer</th>")
$rc = WriteLine(1, "</tr>")
$rc = WriteLine(1, "<tr>")
$rc = WriteLine(1, "<td>@FULLNAME</td>")
$rc = WriteLine(1, "<td>@USERID</td>")
$rc = WriteLine(1, "<td>" + @IPADDRESS0)
$rc = WriteLine(1, "</td>")
For Each $wmiObj in $wmiColl1
$rc = WriteLine(1, "<td>" + $wmiObj.Manufacturer)
$rc = WriteLine(1, "</td>")
$rc = WriteLine(1, "<td>" + $wmiObj.Model)
$rc = WriteLine(1, " </td>")
Next
For Each $wmiObj in $wmiColl2
$rc = WriteLine(1, "<td>" + $wmiObj.SerialNumber)
$rc = WriteLine(1, "</td>")
$rc = WriteLine(1, "<td>" + join(split(readvalue("HKEY_USERS\"+@sid+"\Software\Microsoft\Windows NT\CurrentVersion\Windows","Device"),',',1),''))
$rc = WriteLine(1, "</td>")
$rc = WriteLine(1, "</tr>")
$rc = WriteLine(1, "</table>")
Next
$rc = WriteLine(1, "<h1>Inventory taken on " + @DATE + " at " + @TIME + ".</h1>")
$rc = WriteLine(1, "</BODY>")
$rc = WriteLine(1, "</HTML>")
$rc = Close(1)