#71452 - 2002-11-07 12:06 AM
Bios Info
|
ArchAngel96
Getting the hang of it
Registered: 2002-10-20
Posts: 70
|
I'm attempting to do a "model" hardware inventory for my company. I've found that in our maunfactured machines the BIOS carries the model type of the machine, i.e. Toshiba 4030, HP Vectra VL600, etc etc. My main issue is getting a particular portion of information. Example:
SMBIOS -- Version 3.02 (C) Copyright 2000-2002 Qualitas, Inc. All rights reserved. ======================== SMBIOS Header ======================================== SMBIOS header is present at segment F6CFh. SMBIOS Signature: _SM_. SMBIOS Checksum: 37h. SMBIOS Struc Table Length: 31. SMBIOS Revision #: 2.2. SMBIOS Maximum Struc Size: 72. SMBIOS Entry Point Revision: 0. SMBIOS Reserved: 0000000000. DMI Signature: _DMI_. DMI Checksum: 99h. DMI Struc Table Length: 1119. DMI Struc Table Address: 000E0010h. DMI # Strucs: 44. DMI Revision #: 2.2.
══> Type 1: System Information Struc length is 25 bytes. Struc handle is 0001h. Manufacturer: Hewlett-Packard Product Name: HP Vectra Version: VL600 Serial Number: USxxxxxxxxx Universal Unique ID #: D5EB1EC13CDE1xxxxxxxxxxxxxxxxx0 Wake-Up Type: Other
this information is gathered by using SMBIOS.exe V3.02, my problem is I'm still new to scripting at this level and I have no idea on how to get this iformation. My script looks like:
$x = MemorySize() $w = GetDiskSpace (c:\)
; script main Gosub GetWMIInfo Open (2, "\\nt-xxxxx\logs$\HardwareInventory\hardinve.txt", 4) = 0 WriteLine (2, @WKSTA + "," + $WMIManufacturer + "," + $WMIModel + "," + $WMIBiosSernum + "," + $WMICPUCurrentClockSpeed + "," + $x + "," + $w + @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")) $WMIBiosVersion = Rtrim(WMIQuery("Version", "Win32_BIOS")) $WMIBiosSernum = Rtrim(WMIQuery("SerialNumber", "Win32_BIOS")) $WMISMBIOSBIOSVersion = Rtrim(WMIQuery("SMBIOSBIOSVersion", "Win32_BIOS")) $WMISMBIOSVersion = Rtrim(WMIQuery("SMBIOSVersion", "Win32_BIOS")) $WMICPUCurrentClockSpeed = Rtrim(WMIQuery("CurrentClockSpeed", "Win32_Processor")) $WMICPUL2CacheSize = Rtrim(WMIQuery("L2CacheSize", "Win32_Processor")) 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
If anyone would be as so kind to take a few minutes and see if they can help me that would be GREAT!!! I'm just hoping I'm not throwing the smallest lawn dart in to the biggest football field, just to hit a penny.
_________________________
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?
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(Allen)
and 495 anonymous users online.
|
|
|