Page 1 of 1 1
Topic Options
#68109 - 2002-07-13 12:26 AM Need Some help
Anonymous
Unregistered


I need to read some BIOS information from script.
Like Compaq S/N, CPU type, DISK types and so on..
Any suggestions would be appriciated.
Thanks.

Top
#68110 - 2002-07-13 12:29 AM Re: Need Some help
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hi,

If your running pure NT5 wkstn and Kixtart 4.0+, you can use a builtin tool like WMI. If not, might want to check out a utilitiy like SMBIOS (avaible from MCA's website) ...

Top
#68111 - 2002-07-13 02:34 AM Re: Need Some help
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You should definitely try WMI. Download the WMI documentation from Microsoft's website to get you started. alos, older computers might not support SMBIOS, therefore you'll belimited in to amount of BIOS information you can retrieve.
_________________________
There are two types of vessels, submarines and targets.

Top
#68112 - 2002-07-13 03:03 AM Re: Need Some help
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Have you thought about looking at:
WMIQuery() - Used to execute a query against WMI
TotalMem( $Systemname ) - Determine amount of memory installed using WMI

Either one of these have the functionality you are looking for.

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#68113 - 2002-07-13 03:33 AM Re: Need Some help
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Checkout: WBEM/WMI SMBIOS Provider and CIM_BIOSElement

See this URL for all the CIM classes ( CIM Classes )

Execute this script to see what you can get. Comment out the lines that produce no or undesirable output. Use the "Cim Classes" link to get the readable description for numeric properties.
code:
$x = "CIM_BIOSElement"
$obj = GetObject("winmgmts:").InstancesOf ($x)
? $x
for each $item in $obj
? "Caption: " + $item.Caption
? "CodeSet: " + $item.CodeSet
? "Description: " + $item.Description
? "IdentificationCode: " + $item.IdentificationCode
? "InstallDate: " + $item.InstallDate
? "LanguageEdition: " + $item.LanguageEdition
? "Manufacturer: " + $item.Manufacturer
? "Name: " + $item.Name
? "OtherTargetOS: " + $item.OtherTargetOS
? "PrimaryBIOS: " + $item.PrimaryBIOS
? "SerialNumber: " + $item.SerialNumber
? "SoftwareElementID: " + $item.SoftwareElementID
$x = $item.SoftwareElementState
select
case $x=0 $x=Deployable
case $x=1 $x=Installable
case $x=2 $x=Executable
case $x=3 $x=Running
endselect
? "SoftwareElementState: " + $x
? "Status: " + $item.Status
? "TargetOperatingSystem: " + $item.TargetOperatingSystem
? "Version: " + $item.Version
?
next

$x = "CIM_Chip"
$obj = GetObject("winmgmts:").InstancesOf ($x)
? $x
for each $item in $obj
? "Caption: " + $item.Caption
? "CreationClassName: " + $item.CreationClassName
? "Description: " + $item.Description
$x = $item.FormFactor
select
case $x=0 $x="Unknown"
case $x=1 $x="Other"
case $x=2 $x="SIP"
case $x=3 $x="DIP"
case $x=4 $x="ZIP"
case $x=5 $x="SOJ"
case $x=6 $x="Proprietary"
case $x=7 $x="SIMM"
case $x=8 $x="DIMM"
case $x=9 $x="TSOP"
case $x=10 $x="PGA"
case $x=11 $x="RIMM"
case $x=12 $x="SODIMM"
case $x=13 $x="SRIMM"
case $x=14 $x="SMD"
case $x=15 $x="SSMP"
case $x=16 $x="QFP"
case $x=17 $x="TQFP"
case $x=18 $x="SOIC"
case $x=19 $x="LCC"
case $x=20 $x="PLCC"
case $x=21 $x="BGA"
case $x=22 $x="FPBGA"
case $x=23 $x="LGA"
Endselect
? "FormFactor: " + $x
? "HotSwappable: " + $item.HotSwappable
? "InstallDate: " + $item.InstallDate
? "Manufacturer: " + $item.Manufacturer
? "Model: " + $item.Model
? "Name: " + $item.Name
? "OtherIdentifyingInfo: " + $item.OtherIdentifyingInfo
? "PartNumber: " + $item.PartNumber
? "PoweredOn: " + $item.PoweredOn
? "Removable: " + $item.Removable
? "Replaceable: " + $item.Replaceable
? "SerialNumber: " + $item.SerialNumber
? "SKU: " + $item.SKU
? "Status: " + $item.Status
? "Tag: " + $item.Tag
? "Version: " + $item.Version
?
next

$x = "CIM_PhysicalComponent"
$obj = GetObject("winmgmts:").InstancesOf ($x)
? $x
for each $item in $obj
? "Caption: " + $item.Caption
? "CreationClassName: " + $item.CreationClassName
? "Description: " + $item.Description
? "HotSwappable: " + $item.HotSwappable
? "InstallDate: " + $item.InstallDate
? "Manufacturer: " + $item.Manufacturer
? "Model: " + $item.Model
? "Name: " + $item.Name
? "OtherIdentifyingInfo: " + $item.OtherIdentifyingInfo
? "PartNumber: " + $item.PartNumber
? "PoweredOn: " + $item.PoweredOn
? "Removable: " + $item.Removable
? "Replaceable: " + $item.Replaceable
? "SerialNumber: " + $item.SerialNumber
? "SKU: " + $item.SKU
? "Status: " + $item.Status
? "Tag: " + $item.Tag
? "Version: " + $item.Version
?
next


$x = "CIM_Processor"
$obj = GetObject("winmgmts:").InstancesOf ($x)
? $x
for each $item in $obj
? "AddressWidth: " + $item.AddressWidth
$x=$item.Availability
select
case $x=1 $x="Other"
case $x=2 $x="Unknown"
case $x=3 $x="Running/Full Power"
case $x=4 $x="Warning"
case $x=5 $x="In Test"
case $x=6 $x="Not Applicable"
case $x=7 $x="Power Off"
case $x=8 $x="Off Line"
case $x=9 $x="Off Duty"
case $x=10 $x="Degraded"
case $x=11 $x="Not Installed"
case $x=12 $x="Install Error"
case $x=13 $x="Power Save - Unknown, Device is known to be in a power" +
" save mode, but its exact status in this mode is unknown."
case $x=14 $x="Power Save - Low Power Mode, Device is in a power save" +
" state but still functioning, and may exhibit degraded performance."
case $x=15 $x="Power Save - Standby, Device is not functioning but could" +
" be brought to full power 'quickly'."
case $x=16 $x="Power Cycle"
case $x=17 $x="Power Save - Warning, Device is in a warning state, though" +
" also in a power save mode."
case $x=18 $x="Paused"
case $x=19 $x="Not Ready"
case $x=20 $x="Not Configured"
case $x=21 $x="Quiesced"
endselect
? "Availability: " + $x
? "Caption: " + $item.Caption
? "ConfigManagerErrorCode: " + $item.ConfigManagerErrorCode
? "ConfigManagerUserConfig: " + $item.ConfigManagerUserConfig
? "CreationClassName: " + $item.CreationClassName
? "CurrentClockSpeed: " + $item.CurrentClockSpeed
? "DataWidth: " + $item.DataWidth
? "Description: " + $item.Description
? "DeviceID: " + $item.DeviceID
? "ErrorCleared: " + $item.ErrorCleared
? "ErrorDescription: " + $item.ErrorDescription
? "Family: " + $item.Family
? "InstallDate: " + $item.InstallDate
? "LastErrorCode: " + $item.LastErrorCode
? "LoadPercentage: " + $item.LoadPercentage
? "MaxClockSpeed: " + $item.MaxClockSpeed
? "Name: " + $item.Name
? "OtherFamilyDescription: " + $item.OtherFamilyDescription
? "PNPDeviceID: " + $item.PNPDeviceID
? "PowerManagementCapabilities: " + $item.PowerManagementCapabilities
? "PowerManagementSupported: " + $item.PowerManagementSupported
? "Role: " + $item.Role
? "Status: " + $item.Status
? "StatusInfo: " + $item.StatusInfo
? "Stepping: " + $item.Stepping
? "SystemCreationClassName: " + $item.SystemCreationClassName
? "SystemName: " + $item.SystemName
? "UniqueId: " + $item.UniqueId
? "UpgradeMethod: " + $item.UpgradeMethod
next




[ 13 July 2002, 03:38: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#68114 - 2002-07-15 03:01 PM Re: Need Some help
Anonymous
Unregistered


Thank you all for replying. I will try the suggestions and post results.
Top
#68115 - 2002-07-16 12:56 AM Re: Need Some help
Josh Haynes Offline
Fresh Scripter

Registered: 2002-07-12
Posts: 9
Loc: Medford, OR
sealeopard,
I took a look at the code you provided and I didn't get much back. I ran it as is and I got a lot of empty returns after your : markes? Is there a reason for that? What did I do wrong? It looks like it is very usefull information if I could actualy pull it from my systems.

Thanks,

Josh

Top
#68116 - 2002-07-16 03:56 PM Re: Need Some help
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Josh:

I think you're talking about Howard Bullock's code. Anyway, you'll need WMI installed on the systemn for it to work. WMI is installed by default on Windows 2000/XP. Also, some of the info might not be applicable to your specific system.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 823 anonymous users online.
Newest Members
JimDunn, fgarcia, Viginette, ManuvdWielNL, Sir_Barrington
17890 Registered Users

Generated in 0.195 seconds in which 0.161 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org