×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Return Computer Info

Return Computer Info

Return Computer Info

(OP)
Hi I am looking for some code to return some information about the computer that it is run on. I want to return:

Computer Make
Computer Model
Computer Model Number
Computer Serial Number

I am aware that this information may not be avalable but I was wandering if anyone could help.

Many Thanks
Sylvan

RE: Return Computer Info


Hi,

you might make out better posting this in forum222

Skip,

A palindrome gone wrong?
A man, a plan, a ROOT canal...
PULLEMALL!

RE: Return Computer Info

Hi Sylvan,

There must be a way to do (at least some of) this, but I'm not sure exactly what you're after.

The Computer Make and Model (like, say, Dell Dimension) are not hard wired in. You may see some info in My Computer > Properties but the manufacturer can put what they want there and the (savvy) User can change it although I don't know why they would want to.

The motherboard make and model and various other details are hardwired in, and must be available. Computers don't necessarily have Models and Model Numbers, or Serial Numbers, so I don't know what you are looking for with them.

If you post back with exactly what information you want I will see what I can do.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress

RE: Return Computer Info

(OP)
Hi Tony
Yeah let me explain the situation.

I work for a large company and we are installing Windows XP on a large scale (on 500 odd PC's) so we are using a automated process to install windows. But for every computer that I install Windows XP on I need the following information

Computer Name - I can get this with Enviromen("Computername") or something like that
Computer Make - for example HP Compaq
Computer Model - For example D5s or whatever
Computer Nodel Number - Not that important, becouse if I can get the model thant I can store the model number next to the model and retreve it from that list
Computer Serial Number - This is the serial number on the case of the computer, but again I am not sure if as you say this is hardwored into the computer

now its easy to see all of this information on the case of the computer, but as I say I will be doing this several hunderad times, and loving to write a little code to speed things up I wanted to automate getting this information.

Another thought is that these computers get the serial number from the motherboard, if there is VBA code to get the serial number off the motherboard then I could compare that with what is on the computer.

Many thanks
Sylvan

RE: Return Computer Info

Hi Sylvan,

AFAIK, there is no way to prise "HP Compaq" out of the hardware so you have to rely on someone having put it in there. You could try looking in oeminfo.ini in Windows/System32 (I think).

Again I don't know about actual serial numbers of PCs - network cards have a unique "MAC ID" which is often used for this kind of thing (you can get it via ipconfig - it calls it physical address or something)

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress

RE: Return Computer Info

(OP)
Tony,
What does AFAIK mean?
Anyway I could not find that oeminfo.ini but I have been able to locate the meodel type in the registery, it is created in a folder under the name of the company that designed our automated build, From that I could do the Model & Model Number and maybe even the make,
Looking in Registry for the serial number and no luck :( guess I am just gonna have to resort to typing it in manually :( oh well

Thanks anyway :) - it was your idea of oeminfo that inspired me to look into the registry
Sylvan

RE: Return Computer Info

AFAIK = As Far As I Know

Rgds, Geoff

Three things are certain. Death, taxes and lost data. DPlank is to blame

Please read FAQ222-2244 before you ask a question

RE: Return Computer Info

Hi Sylvan,

Sorry, I try to avoid abbreviations but that one slipped through.

If you have registry information like that, then it might be worth asking the company that did the build for you (or checking their documentation) to see if they've hidden any other details anywhere. Searching the registry is not necessarily successful if there is any kind of encoding.

Just out of curiosity, what format are your serial numbers in?

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress

RE: Return Computer Info

Just a random thought as I'm passing through....
Does your assest register not hold any of the information being sought??

Happy Friday


If a man says something and there are no women there to hear him, is he still wrong?
How do I get the best answers?

RE: Return Computer Info

(OP)
that is why I am colecting this infomation to put into a asset register, we are using the opertunity of transfering everyone to XP to ensure that the asset register is up to date.

RE: Return Computer Info

I was looking for an answer to the very same question and came accross this - - - what a wealth of info. http://www.robvanderwoude.com/index.html

P.S.... If you want the serial number you can change the code as shown:

Set objWMIService = GetObject( "winmgmts://./root/cimv2" )

Set colItems = objWMIService.ExecQuery( "Select * from Win32_BIOS where PrimaryBIOS = true", , 48 )

For Each objItem in colItems
    strMsg = strMsg _
           & "    BIOS Name       :  " & objItem.Name & vbCrLf _
           & "    Version         :  " & objItem.Version & vbCrLf _
           & "    Manufacturer    :  " & objItem.Manufacturer & vbCrLf _
           & "    Serial Number   :  " & objItem.SerialNumber & vbCrLf _
           & "    SMBIOS Version  :  " & objItem.SMBIOSBIOSVersion & vbCrLf
Next

WScript.Echo strMsg

RE: Return Computer Info

(OP)
Wow thanks Mikaki,
I must admit I had given up hope of finding this information. So all this informaiton is comming from the BIOS? Is there any other particularly usefull infomation that I can pull out of there?

Good job :) :)

Many Thanks
Sylvan

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close