No now I have a new question... now that I've been staring at this script for the last 3 hours.

I wish to query a specific piece of information, i.e. the NIC Card, disk space total and free on C: only. I'm having a problem limiting the info to just the one item. I've attempted to use if statements but obviously my thinking ins correct. I'm missing some qualifier and I'm not sure what it is or where.....

Example:

$WMICDrive = 0

; script main
Gosub GetWMIInfo
Open (2, "\\nt-xxxxxx\logs$\HardwareInventory\hardinve.txt", 4) = 0
WriteLine (2, @WKSTA + "," + $WMIManufacturer + "," + $WMIModel + "," + $WMIModelVersion + "," + $WMIBiosSernum + "," + $WMICPUCurrentClockSpeed + "," + $WMITotalPhysicalMemory + "," + $WMICDriveSize + "," + $WMICDriveFreeSpace + "," + $WMIManufacturer2 + "," + $WMIDisplayDescription + "," + $WMINICName + "," + $WMISoundCard + "," + $WMICDRom + @CRLF)
;Else
; ? "Failed to open file"
Close (2)

;Get $x
Exit
; main end

;***************************
;* sub GetWMIInfo *
;***************************
:GetWMIInfo
If @INWIN$ = 1
$WMIManufacturer = Rtrim(WMIQuery("Manufacturer", "Win32_ComputerSystem"))
$WMIModel = Rtrim(WMIQuery("Model", "Win32_ComputerSystem"))
$WMIManufacturer2 = Rtrim(WMIQuery("Version", "Win32_ComputerSystemProduct"))
$WMIBiosVersion = Rtrim(WMIQuery("Version", "Win32_BIOS"))
$WMIBiosSernum = Rtrim(WMIQuery("SerialNumber", "Win32_BIOS"))
$WMISMBIOSVersion = Rtrim(WMIQuery("SMBIOSVersion", "Win32_BIOS"))
$WMICPUCurrentClockSpeed = Rtrim(WMIQuery("CurrentClockSpeed", "Win32_Processor"))
$WMITotalPhysicalMemory = Rtrim(WMIQuery("TotalPhysicalMemory", "Win32_LogicalMemoryConfiguration"))
$WMICDrive = Rtrim(WMIQuery("Caption", "Win32_LogicalDisk"))
If $WMICDrive = C:
$WMICDriveSize = Rtrim(WMIQuery("Size", "Win32_LogicalDisk"))
$WMICDriveFreeSpace = Rtrim(WMIQuery("FreeSpace", "Win32_LogicalDisk"))
EndIf
;$WMICDriveSize = Rtrim(WMIQuery("Size", "Win32_LogicalDisk"))
;$WMICDriveFreeSpace = Rtrim(WMIQuery("FreeSpace", "Win32_LogicalDisk"))
$WMIDisplayDescription = Rtrim(WMIQuery("Description", "Win32_DisplayControllerConfiguration"))
$WMINICName = Rtrim(WMIQuery("Caption", "Win32_NetworkAdapterConfiguration"))
$WMISoundCard = Rtrim(WMIQuery("Caption", "Win32_SoundDevice"))
$WMICDRom = Rtrim(WMIQuery("Caption", "Win32_CDROMDrive"))
EndIf
Return

;***************************
;* function WMIQuery *
;***************************
Function WMIQuery($what, $where)
Dim $strQuery, $objEnumerator, $value
$strQuery = "Select $what From $where"
$SystemSet = GetObject("winmgmts:{impersonationLevel=impersonate}")
$objEnumerator = $SystemSet.ExecQuery($strQuery)
For Each $objInstance in $objEnumerator
If @Error = 0 AND $objInstance <> ""
$junk = Execute("$$value = $$objInstance.$what")
$WMIQuery = "$value" + "|" + "$WMIQuery"
EndIf
Next
$WMIQuery = Left($WMIQuery, Len($WMIQuery) - 1)
EndFunction
_________________________
penny = the target the playing field = three football fields side by side you = only allowed to stand on the outside of the playing field tool you get to use to find the penny = a ONE INCH LAWN DART get the level of difficulty?