I'd go that way anyway if for logon script purposes [Wink]

Well, not the database but the ini-file way (see documentation for writeprofilestring() )

You can then fill an Excel logfile directly from an admin Workstation...

Ok, Silver Plate Code served today [Wink]

In your logonscript place this (untested) :


$log = "\\Pathtoini\inifilename.ini" ;change this

$_ = writeprofilestring( $log,@wksta,'MEM',(Val(WMIQuery("TotalPhysicalMemory","Win32_LogicalMemoryConfiguration"))/1024) )
$_ = writeprofilestring( $log,@wksta,'CPU',WMIQuery("CurrentClockSpeed","Win32_Processor") )


Run this script from an admin Workstation:


$log = "\\Pathtoini\inifilename.ini" ;change this as well
$xlFile = "\\Pathtofile\Excelfilename.xls"

if exist($xlFile) del $xlFile endif

$asSections = split(readprofilestring($log,"",""),chr(10))
redim preserve $asSections[ubound($asSections)-1] ;strip last empty

global $machines[ubound($asSections)] ;declare '1st dimension'

for $i = 0 to ubound($machines) ; fill '2nd Dimension'
$machines[$i] = $asSections[$i],
val(readprofilestring($log,$asSections[$i],"MEM")),
val(readprofilestring($log,$asSections[$i],"CPU"))
next

$header = "Workstation","Physical Memory","CPU Speed"
$xl = createobject("excel.application")
if not @error
$ = $xl.Workbooks.Add
$xl.Range("A1:C1").Value = $header
$xl.Range("A1:C1").Font.Bold = 1
$xl.Range("A1:C1").Orientation = 90
$ = $xl.Range("A1:C1").AutoFilter
for $i = 0 to ubound($machines)
$xl.Range("A"+($i+2)+":C"+($i+2)+"").Value = $machines[$i]
next
$xl.Range("A1:B1").Cells.ColumnWidth = 15
$xl.Range("C1:C1").Cells.ColumnWidth = 8
$xl.Range("A1:C1").EntireColumn.HorizontalAlignment = 3
$ = $xl.Range("A2").Activate
$xl.ActiveWindow.FreezePanes = 1
$ = $xl.ActiveWorkbook.SaveAs("$xlFile")
$xl.UserControl = 1
$bye = $xl.quit
else
exit 0
endif



et voila, all Workstations results in one Excel file.

Basically the same as you do but a bit different [Wink]
_________________________