Page 1 of 1 1
Topic Options
#51472 - 2000-09-14 10:34 PM Inventory Script
Anonymous
Unregistered


I'm writing a inventory script for a mixed bag of OSs (win98,NT,2k). One hang up I have right now is determining the amount of memory installed for win98,winNT.

I've done all my development on win2k, and initially used msinfo32.exe with the /report and /categories command switches (see below). After parsing the output. I get all kinds of cool info; System Brand, System Model, and of course Total Memory.

Much to my dismay I found that winnt/win98 don't have command line switches for msinfo32.

In a previous post, someone gave the solution of mem /c. However this doesn't tell you how much total physical memory is installed. Just the amount of DOS memory available.

So my question is. Has anyone out there written a script that reports the amount of physical memory for winNT and or win98?

Thanks in advance

heres a portion of my win2k part of the inventory script. I hope it comes out readable.

;get lots of cool information from msinfo if running win2k
if ($os = "win2k")

$msinfo = readvalue("HKEY_LOCAL_MACHINE\software\Microsoft\shared tools\msinfo", "path")
$string = "$msinfo "
$string2 = CHR(47)+"report c:\summary.txt "+CHR(47)+"categories +SystemSummary"
shell "$string$string2"

$string3 = "type c:\summary.txt "+CHR(62)+" summary2.txt" ;converts the output of sysinfo to regular text
shell "$string3"

$dummy = open (1, "c:\summary2.txt")
$x = 0
while ($x < 29)
$y = readline(1)
select
case $x = '8'
$os = substr($y,9,50)
case $x = '9'
$version = substr($y,9,50)
case $x = '12'
$sysbrand = substr($y,21,50)
case $x = '13'
$sysmodel = substr($y,14,50)
case $x = '22'
$tzone = substr($y,11,50)
case $x = '23'
$memory = substr($y,23,50)
endselect
$x = $x + 1
loop
$dummy = close (1)
endif

Top
#51473 - 2000-09-14 10:51 PM Re: Inventory Script
Anonymous
Unregistered


You know I really should have did a search for this before I posted....

I found all my answers in the following thread...
http://kixtart.org/board/Forum2/HTML/000213.html

Thanks

Top
#51474 - 2000-09-15 06:23 PM Re: Inventory Script
Anonymous
Unregistered


If you're doing this for a company, why not purchase a software package like Intel Landesk or Microsoft SMS. I use Landesk and highly recommend it. It's made life very easy when administrating the client PCs. Just a suggestion.
Top
#51475 - 2000-09-16 02:10 PM Re: Inventory Script
Anonymous
Unregistered


Using Network Associates ZAC. No complaints.
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 369 anonymous users online.
Newest Members
rrosell, PatrickPinto, Raoul, Timothy, Jojo67
17877 Registered Users

Generated in 0.05 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

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