Sign in to follow this  
Followers 0
ioliver

Looking for a System Inventory Script or App

28 posts in this topic

I need a quick (cheap/free) way to get information about the computers on my network. I need to get things like: computer name, make/model of computer (Ex. Dell Optiplex GX110), and amount of memeory for starters. I know that this information is available from SYSINFO32, and I am currently working on an AutoIt script to do this, but it will take some time. And, rather than reinvent the wheel, I thought I'd see if someone had already done this?

Alright, thanks for taking the time to raead this post. Any help would be great.

Ian


"Blessed be the name of the Lord" - Job 1:21Check out Search IMF

Share this post


Link to post
Share on other sites



Thanks for the info ezzetabi. I think that will help. Now, I just need to find a way to script getting the Make/Model of the PC.

This is a support forum post...

I thought about putting it in the Support Forum, but then I thought, if someone already has a script to do this, then this would be a good place for it.

Anyway, Thanks again,

Ian


"Blessed be the name of the Lord" - Job 1:21Check out Search IMF

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I don't believe anyone has posted such a script yet, but I will be more than happy to assist if you run into problems writting your own. In light that everyone is giving you 3rd party applications, I too will share my limited knowledge... check out Aida16/Aida32 (also part of BartPE/UBCD).

I understand you are probably looking for an AutoIt only answer, so if you post exactly what information you are looking for from the script I will do my best to assist. :ph34r:

*** Matt @ MPCS

EDIT: Please do not post here... move this to the support forum where it belongs!

Edited by Matt @ MPCS

Share this post


Link to post
Share on other sites

Matt, thanks for your offer to help.  There is a post in the support forums called "Help using the Run() command" that addresses this issue.  http://www.autoitscript.com/forum/index.php?showtopic=4752

Thanks again,

Ian

<{POST_SNAPBACK}>

If you create a script to read the values below it will give you the make and model. I do have a script that does this, I just need to locate it. :-)

Registry path

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OemInfo

String Values

WbemProduct (THIS IS THE MAKE)

WbemOem (THIS IS THE MODEL)

Share this post


Link to post
Share on other sites

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OemInfo

String Values

WbemProduct    (THIS IS THE MAKE)

WbemOem        (THIS IS THE MODEL)

Sure. It tell's me I'm using an IBM 2673C2G.

Strange, my computer looks more like a Dell C400...

I guess this is not always perfect. The best way I've come up to is to read the device drivers installed and try to gather some informations from these drivers through the registry. But this is very time consuming (when creating the database...).

If there's a way to read the BIOS Identifier I'm all ears...

Share this post


Link to post
Share on other sites

The SysInfo32 has to get the information from somewhere... what does SysInfo32 tell you you are running? I am pretty sure that is where it gets the info.

*** Matt @ MPCS

Share this post


Link to post
Share on other sites

The SysInfo32 has to get the information from somewhere... what does SysInfo32 tell you you are running? I am pretty sure that is where it gets the info.

It tell's me I'm running a Dell Latitude C400 with BIOS version A12.

So this registry key is not the source for sysinfo32.

Share this post


Link to post
Share on other sites

Here is a vbs script using WMI that can get the info you want. It also displays username and PC name

On Error Resume Next

strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_TimeZone",,48)

Set colItems2 = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)

report = ""

For Each objItem in colItems

report = report & vbCrLf & "Current Time Zone: " & objItem.Description & vbCr & _

""

Next

For Each objItem in colItems2

report = report & vbCrLf & "UserName: " & objItem.UserName & vbCrLf & _

"PC Name: " & objItem.Name & vbCrLf & _

"Manufacturer: " & objItem.Manufacturer & vbCrLf & _

"Model: " & objItem.Model & vbCrLf & _

""

Next

Wscript.Echo report

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

I pulled a file off of a gateway reload disk called biosid.exe. Running it writes a "SRCDID.tmp" file that has info about the manufacturer/computer model/computer type. I use autoit to parse the file and give me the information. You can fileinstall it then delete it afterwards if you dont want it to be seen by the user.

biosid.exe

Edit: I forgot to mention this works on brand name PC's only ... Custom built PC's will usually not report this info from the BIOS

Edited by psichosis

We have enough youth. How about a fountain of SMART?

Share this post


Link to post
Share on other sites

Here is a vbs script using WMI that can get the info you want. It also displays username and PC name

On Error Resume Next

strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_TimeZone",,48)

Set colItems2 = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)

report = ""

For Each objItem in colItems

    report = report & vbCrLf & "Current Time Zone: " & objItem.Description & vbCr & _

    ""

Next

For Each objItem in colItems2

    report = report & vbCrLf & "UserName: " & objItem.UserName & vbCrLf & _

    "PC Name: " & objItem.Name & vbCrLf & _

    "Manufacturer: " & objItem.Manufacturer & vbCrLf & _

    "Model: " & objItem.Model & vbCrLf & _

    ""

Next

Wscript.Echo report

<{POST_SNAPBACK}>

Thanks for the script. Is there a Win32_ WMI Object that has information about the Processer, Memory, and Hard Drive that I can connect to?

I hope I phrased that correctly.

Thanks again,

Ian


"Blessed be the name of the Lord" - Job 1:21Check out Search IMF

Share this post


Link to post
Share on other sites

This script provides the information you want and alot more, just remove what you do not need. After it is run it will create a text file in the same location as the script called (computername).txt

On Error Resume Next

Set oShell = CreateObject("wscript.Shell")

Set env = oShell.environment("Process")

strComputer = env.Item("Computername")

Const HKEY_LOCAL_MACHINE = &H80000002

Const UnInstPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_

".\root\default:StdRegProv")

report = strComputer & " Computer Inventory" & vbCrLf & "******************************************" & vbCrLf

& vbCrLf

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem",,48)

report = report & vbCrLf & "******************************************" & vbCrLf

report = report & "OS Information" & vbCrLf & "******************************************" & vbCrLf & vbCrLf

For Each objItem in colItems

report = report & "Caption: " & objItem.Caption & vbCrLf

report = report & "Description: " & objItem.Description & vbCrLf

report = report & "EncryptionLevel: " & objItem.EncryptionLevel & vbCrLf

report = report & "InstallDate: " & objItem.InstallDate & vbCrLf

report = report & "Manufacturer: " & objItem.Manufacturer & vbCrLf

report = report & "MaxNumberOfProcesses: " & objItem.MaxNumberOfProcesses & vbCrLf

report = report & "Name: " & objItem.Name & vbCrLf

report = report & "Organization: " & objItem.Organization & vbCrLf

report = report & "OSProductSuite: " & objItem.OSProductSuite & vbCrLf

report = report & "RegisteredUser: " & objItem.RegisteredUser & vbCrLf

report = report & "SerialNumber: " & objItem.SerialNumber & vbCrLf

report = report & "ServicePackMajorVersion: " & objItem.ServicePackMajorVersion

report = report & "ServicePackMinorVersion: " & objItem.ServicePackMinorVersion & vbCrLf

report = report & "Version: " & objItem.Version & vbCrLf

report = report & "WindowsDirectory: " & objItem.WindowsDirectory & vbCrLf

Next

Set colSettings = objWMIService.ExecQuery _

("Select * from Win32_ComputerSystem")

report = report & vbCrLf & "******************************************" & vbCrLf

report = report & "Memory and Processor Information" & vbCrLf & "******************************************" &

vbCrLf & vbCrLf

For Each objComputer in colSettings

'report = report & objComputer.Name & vbcrlf

report = report & objComputer.TotalPhysicalMemory /1024\1024+1 & "MB Total memory" & vbcrlf

Next

Set colSettings = objWMIService.ExecQuery _

("Select * from Win32_Processor")

For Each objProcessor in colSettings

report = report & objProcessor.Description & " Processor" & vbCrLf

Next

Set cInstances = GetObject("winmgmts:{impersonationLevel=impersonate}//" &_

strComputer & "/root/cimv2:Win32_Service").Instances_

'********************************

'*** Enumerate instances in the loop, for each, list relevant properties

report = report & vbCrLf & "******************************************" & vbCrLf

report = report & "Services" & vbCrLf & "******************************************" & vbCrLf & vbCrLf

For Each oInstance In cInstances

report = report & "Name:" & vbTab & vbTab & oInstance.Properties_("Name").Value & vbCrLf

report = report & "DisplayName:" & vbTab & oInstance.Properties_("DisplayName").Value & vbCrLf

report = report & "StartMode:" & vbTab & oInstance.Properties_("StartMode").Value & vbCrLf

report = report & "State:" & vbTab & vbTab & oInstance.Properties_("State").Value & vbCrLf

Next

report = report & vbCrLf & "******************************************" & vbCrLf

report = report & "Disk Drive Information" & vbCrLf & "******************************************" & vbCrLf &

vbCrLf

Set objWMIService = GetObject("winmgmts:")

Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='c:'")

report = report & objLogicalDisk.FreeSpace /1024\1024+1 & "MB Free Disk Space" & vbCrLf

report = report & objLogicalDisk.Size /1024\1024+1 & "MB Total Disk Space" & vbCrLf

oReg.EnumKey HKEY_LOCAL_MACHINE, UnInstPath, arrSubKeys

software = software & vbCrLf & "******************************************" & vbCrLf

software = software & "Installed Software" & vbCrLf & "******************************************" & vbCrLf &

vbCrLf

For Each subkey In arrSubKeys

'MsgBox subkey

If Left (subkey, 1) <> "{" Then

software = software & subkey & vbCrLf

End If

Next

Set fso = CreateObject("Scripting.FileSystemObject")

Set ts = fso.CreateTextFile (strComputer & ".txt", ForWriting)

ts.write report

ts.write software

'MsgBox Report

MsgBox "Done"

Share this post


Link to post
Share on other sites

Yuck! VB Script :( . That takes me back to my days as a civil servent. :ph34r:

*** Matt @ MPCS

Share this post


Link to post
Share on other sites

Yuck! VB Script :( . That takes me back to my days as a civil servent.  :ph34r:

*** Matt @ MPCS

<{POST_SNAPBACK}>

LOL, I agree. I use VB as little as possible. I've been using AutoIt GUI alot lately, which is awesome.

Share this post


Link to post
Share on other sites

I've been using VB for years now and don't mind it too bad... but its take off, VBScript, just seems like a half-assed scripting language made to fill another checkbox for Microsoft.

*** Matt @ MPCS

Share this post


Link to post
Share on other sites

Is there a way to set the Model info so that when querying with WMI it will report the Model info you have set?

Thanks,

Dave

Share this post


Link to post
Share on other sites

You could spy the registry while WMI is getting the info and find out which registry keys are being read. I suggest using RegMon from Winternals.

*** Matt @ MPCS

Share this post


Link to post
Share on other sites

get yourself a copy of smbiosd either by google or

ftp://ftp.sudleyplace.com/sudleyplace/smbiosd.zip

i've been using it for pc inventory..works great, especially if you pipe info you need only via "/t=1" parameter..because the default has a boatload of system specs.

info from the textfile within

--

This program displays all SMBIOS/DMI information within the BIOS. The

information is organized as a series of Structures each of which is a

certain Type. For more details, see a copy of the SMBIOS

specification "System Management BIOS Reference Specification". This

program was written for version 2.3.4 (6 December 2002) of the SMBIOS

Reference Specification. Sources for this spec include

http://www.dmtf.org/standards/bios.php

--

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0