Page 1 of 1 1
Topic Options
#56818 - 2001-06-28 05:12 PM Hardware info!
Anonymous
Unregistered


is there another way to extract information about the hardware other than using SIMBIOS program?

on some of out machines it does not work..

Top
#56819 - 2001-06-28 05:56 PM Re: Hardware info!
bleonard Offline
Seasoned Scripter
*****

Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
Bonky -
I too have seen these problems with older systems. I've yet to get good processor/ram etc. details out of systems easily. You could perform a process, especially on Win9x. For WinNT you could run winmsd to get report, then use Kix to strip data out into delimited file. Big problem wil lbe interpreting the Intel processor - I'm no h/w engineer, so interpreting their whole Family/Stepping thing not easy for me. If you do get a good solution let me know.

Below is code I used for a project to strip data from WinMSD export files.

Bill

code:

; REM Script will run through MSD Text files to pull relevant data.
; REM 2001.03.27


; REM ** Set global variables
$ChkDom = ""
$Drv = "C:"
$Dir = "\<dir>\<folder>"
$WorkDir = "$Drv$Dir"
$CR = CHR(13) + CHR(10) ; REM ** Carriage returns
$ChkList = "chklist.txt" ; REM ** Contains read list of all defined Domain Members (WinNT/2K) for Kix Script.
$MemList = "memlist.txt" ; REM ** Contains raw list of all defined Domain Members (WinNT/2K).
$MsdList = "msdlist.txt" ; REM ** Contains domain member list to run WinMSD and Net View commands.
$NTDet = "nt_det.txt" ; REM ** Kix output file for Detail system data from WinMSD files.
$NTShr = "nt_shr.txt" ; REM ** Kix output file for Shared Resource data from WinMSD files.
$NTSvc = "nt_svc.txt" ; REM ** Kix output file for Services data from WinMSD files.


SELECT
CASE (@DOS = "5.0")
$RC = MESSAGEBOX ("This script only runs with WinNT 4.0 utilities, not Win2K which is your operating system.","NOTICE",64)
$RC = MESSAGEBOX ("You must have the WinNT 4.0 'Winmsd.exe' utility on your system, in your local path, and named 'WinmsdNT.exe.","NOTICE",64)
$RC = MESSAGEBOX ("You must have the WinNT 4.0 'Netdom.exe' utility on your system, in your local path, and named 'NetdomNT.exe.","NOTICE",64)
$RC = MESSAGEBOX ("Confirm 'WinmsdNT.exe' and 'NetdomNT.exe' on your system. Press 'Yes' to Continue, 'No' to abort.","NOTICE",20)

IF $RC = 6 ; REM ** '6' = 'Yes' button selected, 7 ='NO' button.
$Msd = "Winmsdnt"
$Net = "Netdomnt"
ELSE
$RC = MESSAGEBOX ("Aborting process until 'Winmsd.exe' and 'Netdom.exe' verified for correct versions installed.","NOTICE",64)
EXIT
ENDIF
CASE (@DOS = "4.0")
$Msd = "Winmsd"
$Net = "Netdom"
ENDSELECT


REM ** Obtains list of WinNT/2K Domain members to query from a file.
SHELL "%COMSPEC% /c $Drv"
SHELL "%COMSPEC% /c CD $Dir"
SHELL "%COMSPEC% /c $Net /d:$ChkDom Member > $MemList"
SHELL "%COMSPEC% /c $Net /d:$ChkDom BDC >> $MemList"


OPEN (1, "$MemList") ; REM ** 'Read'-file to massage for member names.
OPEN (2, "$ChkList", 5) ; REM ** 'Write'-file to hold new data
OPEN (3, "$MsdList", 5) ; REM ** INTERACTIVE batch file to run WINMSD and NET VIEW on domain members.


:NAME_LOOP
$Read = READLINE (1)
SELECT
CASE (@ERROR <> 0) EXIT
CASE (@ERROR = 0)
SELECT
CASE INSTR ($Read, "Listing members of domain")
$Read = READLINE (1)
DO
$Read = READLINE (1)
IF INSTR ($Read, "MEMBER")
$Name = SUBSTR ($Read, 16, LEN($Read))
$Console = WRITELINE (2, "$Name.txt" + $CR)
$Console = WRITELINE (3, "$MSD \\$Name /s" + $CR)
$Console = WRITELINE (3, "NET VIEW \\$Name > $Name.txt" + $CR)
ENDIF
UNTIL (INSTR ($Read, "MEMBER") = 0)
CASE INSTR ($Read, "Listing BDCs")
$Read = READLINE (1)
DO
$Read = READLINE (1)
IF INSTR ($Read, "BDC")
$Name = SUBSTR ($Read, 13, LEN($Read))
$Console = WRITELINE (2, "$Name.txt" + $CR)
ENDIF
UNTIL (INSTR ($Read, "BDC") = 0)
GOTO EXIT_NAME
ENDSELECT
GOTO NAME_LOOP
ENDSELECT


:EXIT_NAME
$Console = CLOSE (1)
$Console = CLOSE (2)
$Console = CLOSE (3)


; REM ** Start WinMSD batch file to query domain members
SHELL "%COMSPEC% /c $MsdList"
SHELL "%COMSPEC% /c MOVE $ChkList.@DATE"
SHELL "%COMSPEC% /c MOVE $MemList.@DATE"
SHELL "%COMSPEC% /c MOVE $MSDList.@DATE"
SHELL "%COMSPEC% /c DIR *.txt > runlist.txt" ; REM ** Get list of all text files to check for MSD data.


; REM ** Export data from workstation/server files into 3 consolidated files in pipe-delimited format.
$Console = OPEN (1, "$WorkDir\runlist.txt")
$Console = OPEN (7, "$WorkDir\$NTDet", 5)
$Console = OPEN (8, "$WorkDir\$NTSvc", 5)
$Console = OPEN (9, "$WorkDir\$NTShr", 5)
$Console = WRITELINE (7, "System Name|Domain|Role|OS|Service Pack|Procssor1|Processor2|Comment|Product Number" + $CR)
$Console = WRITELINE (8, "System Name|Role|OS|Services" + $CR)
$Console = WRITELINE (9, "System Name|Domain|Role|OS|Defined Share" + $CR)


:FILE_LOOP
$File = READLINE (1)
$Console = OPEN (2, "$WorkDir\$File")
SELECT
CASE ($File < "000000") ; REM ** Extra blank line at end of file.
GOTO EXIT_LOOP
CASE ($Console = "0")
$Read = READLINE (2)
$Read = READLINE (2)
$Read = READLINE (2)
$Read = READLINE (2)
$Read = READLINE (2)
$SysNam = UCASE (SUBSTR ($Read, 36, LEN($Read)))


$x2=1
WHILE ((@ERROR=0) AND ($x2 <> "6"))
$Read = READLINE (2)
SELECT
CASE INSTR ($Read, "OS Version Report")
$Read = READLINE (2)
$Read = READLINE (2)
$Role = SUBSTR ($Read, 31, LEN($Read))
$Read = READLINE (2)
$Ver = SUBSTR ($Read, 9, 3)
SELECT
CASE ($Ver = "4.0")
$Ver = "Windows NT"
$SvcPk = SUBSTR ($Read, 40, 1)
CASE ($Ver = "5.0")
$Ver = "Windows 2000"
SELECT
CASE (SUBSTR ($Read, 42, 2) = "RC") $SvcPk = SUBSTR ($Read, 39, 9) ; REM ** SP1 w/Recovery Console
CASE (SUBSTR ($Read, 40, 1) = "1") $SvcPk = SUBSTR ($Read, 40, 1) ; REM ** SP1 w/o Recovery Console
CASE (SUBSTR ($Read, 40, 1) <> "1") $SvcPk = "0" ; REM ** No Service Pack
ENDSELECT
CASE (1)
$Ver = "Unknown ?"
ENDSELECT


$Read = READLINE (2)
$Read = READLINE (2)
$ID = SUBSTR ($Read, 17, LEN($Read))
$x2=$x2+1
CASE INSTR ($Read, "Processor list:")
$Read = READLINE (2)
$Proc1 = SUBSTR ($Read, 4, LEN($Read))
$Read = READLINE (2)


SELECT
CASE (SUBSTR ($Read, 4, 1) = "1")
$Proc2 = SUBSTR ($Read, 4, LEN($Read))
$Read = READLINE (2)
CASE (SUBSTR ($Read, 4, 1) <> "1")
$Proc2 = ""
ENDSELECT
SELECT
CASE (SUBSTR ($Read, 4, 1) = "2")
$Proc3 = SUBSTR ($Read, 4, LEN($Read))
$Read = READLINE (2)
CASE (SUBSTR ($Read, 4, 1) <> "2")
$Proc3 = ""
ENDSELECT
SELECT
CASE (SUBSTR ($Read, 4, 1) = "3")
$Proc4 = SUBSTR ($Read, 4, LEN($Read))
$Read = READLINE (2)
CASE (SUBSTR ($Read, 4, 1) <> "3")
$Proc4 = ""
ENDSELECT


$x2=$x2+1
CASE INSTR ($Read, "Services Report")
$Read = READLINE (2)
$x3=1
DO
$Read = READLINE (2)
$Stop = SUBSTR ($Read, LEN ($Read), 1)
SELECT
CASE ($Stop = ")")
$Svc = $Read
$x3=$x3+1
$Console = WRITELINE (8, "$SysNam|$Role|$Ver|$Svc" + $CR)
CASE ($Stop <> ")")
GOTO EXIT_SVC
ENDSELECT
UNTIL ($x3=100)

:EXIT_SVC
$x2=$x2+1
CASE INSTR ($Read, "Network Report")
$Read = READLINE (2)
$Read = READLINE (2)
$Read = READLINE (2)
$Domain = SUBSTR ($Read, 22, LEN ($Read))
$x2=$x2+1
CASE INSTR ($Read, "Shared resources at")
$Read = READLINE (2)
$Read = READLINE (2)
$Read = READLINE (2)
$Comment = $Read
$Read = READLINE (2)
$Read = READLINE (2)
$Read = READLINE (2)
$Read = READLINE (2)
$Read = READLINE (2)
$x3=1
DO
$Read = READLINE (2)
SELECT
CASE INSTR ($Read, "The command completed")
GOTO EXIT_SHR
CASE (1)
$Shr = RTRIM ($Read)
$Console = WRITELINE (9, "$SysNam|$Domain|$Role|$Ver|$Shr" + $CR)
$x3=$x3+1
ENDSELECT


UNTIL ($x3=200)
:EXIT_SHR
$x2=$x2+1

ENDSELECT

LOOP

$Console = CLOSE (2)

ENDSELECT
$Console = WRITELINE (7, "$SysNam|$Domain|$Role|$Ver|$SvcPk|$Proc1|$Proc2|$Comment|$ID" + $CR)
GOTO FILE_LOOP


:EXIT_LOOP
$Console = CLOSE (1)
$Console = CLOSE (7)
$Console = CLOSE (8)
$Console = CLOSE (9)



[This message has been edited by bleonard (edited 28 June 2001).]

Top
#56820 - 2001-06-28 06:11 PM Re: Hardware info!
Anonymous
Unregistered


oppps!! I forgot to mention I have win9x clients.... 8(
Top
#56821 - 2001-06-28 06:14 PM Re: Hardware info!
Anonymous
Unregistered


Would WINMSD work on Win95 clients ?
Top
#56822 - 2001-06-28 06:22 PM Re: Hardware info!
bleonard Offline
Seasoned Scripter
*****

Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
Bonky -
I do not believe WinMSD will execute under Win9x (think I tested before) - but recommend you test on 1 system to confirm.
Bill

Top
#56823 - 2001-06-28 06:24 PM Re: Hardware info!
Anonymous
Unregistered


could u send me a copy of that proggie ?
Top
#56824 - 2001-06-29 06:36 AM Re: Hardware info!
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

Are you meaning smbios from IBM company or is it another one?

Mostly we don't find it a problem that a little amount of PC's doesn't
handle the script for inventory in a correct way. Mostly we are using
such information for replacing or extending PC's before migration or
new software distribution starts.

We think that the amount of effort can be too big, when you try to
catch all machines.
F.e. we can't get the serial numbers of our mouses by any tool, but
information about


  • processor type + speed
  • memory size + type
  • memory upgrade capabilties
  • motherboard
  • physical disksize + amount of diskpartition + amount of free diskspace
  • cdrom available

is must easier.
For the missing information we fly to it, or we are calling the user
at a local site.
Greetings.

btw: winmsd will create an error when you doesn't have a proper network configuration.
errors or a temporary windows we don't like.
most things on our site are going on without any notion by users.


------------------
Site map:

[This message has been edited by MCA (edited 30 June 2001).]

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#56825 - 2001-06-29 11:09 AM Re: Hardware info!
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I've made a script that I've some time ago posted (I was just starting it back then) in here. it callects info directly from registry and it does not need logon/logoff neither at's. It gives info on every our machine, even printers. offcourse there are the view win-clients that do not allow admin connection, but disadvantage goes back to those machines and their users.

problem that I have and no one told me how to collect is computers manufacturer.
when you've used windows update in your machine it creates regvalue for that too, but otherwise it's not found on reg.
windows finds it anyway and I believe it takes it from bios when needed.

so does anyone know how to pick up the info of manufacturer and system type?

examp. on IBM (god forbit) it could be used to know every small detail about the machine.
nicest thing would be the serial number, but haven't found that anywhere so I keep on treaming...

------------------
Lonkero

The weardest there is!

_________________________
!

download KiXnet

Top
#56826 - 2001-06-29 07:07 PM Re: Hardware info!
bleonard Offline
Seasoned Scripter
*****

Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
Bonky -
Winmsd and Netdom should be part of any Winnt installation.
Check %SystemRoot%\System32, and \Program Files\Support Tools.
Bill

[This message has been edited by bleonard (edited 29 June 2001).]

Top
#56827 - 2001-07-03 07:38 AM Re: Hardware info!
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
How to make winmsd faster? I only want to print out the part of system information that has system manufacturer. but it makes 187kbyte file and takes up two minutes. it is too long when I only want to collect two or three values!
_________________________
!

download KiXnet

Top
#56828 - 2001-07-03 05:46 PM Re: Hardware info!
bleonard Offline
Seasoned Scripter
*****

Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
Lonkero -
Could try running summary report to a file -
winmsd \\<system> /s /f
from your login script, then have clients move files to share on a central server. Lastly, run Kix to sort through all the files.
Bill

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 1045 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.062 seconds in which 0.028 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