Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

deputy_doofy

macrumors 65816
Original poster
Sep 11, 2002
1,466
410
I have a few questions that I'm hoping can be answered regarding scripting. I'm interested in writing a vb script that would pull info about a computer, including:
- Manufacturer (Dell/HP/etc.)
- Model (Optiplex, Evo, etc.)
- OS (assumption Windows XP/Vista)
- CPU (type and speed)
- Memory
- MAC address
- Serial number
...and probably other stuff.

1) Can this info be found in the registry? If so, can vb script extract it?
2) Can vb script then attach itself to a database (other than Access) and store the info as necessary?

I'm trying to create an automated program/database that keeps track of PC's here at work and having the PC gather this information itself, rather than walking around to collect it, would be phenomenal. I'm sure it can be done, but the question is how.

All help would be greatly appreciated.
 

mark-itguy

macrumors regular
Mar 22, 2007
106
0
Although I've been an IT Admin for over a decade, I never got very good at scripting. Any time I have to have a VBScript, I usually get an example off the Web as a starting point. For your case though, the information can be extracted via WMI, and maybe via a WSH script instead of VBScript.

I am responding just to try to get you pointed in the right direction, not being sarchastic! Cechk out 'The Scripting Guy' at the MS Web site. They have tons of examples to start from. That's what I'd do, since I can not write my own code from scratch.
 

Westside guy

macrumors 603
Oct 15, 2003
6,411
4,280
The soggy side of the Pacific NW
I would strongly recommend against downloading and running any network-aware script if you don't really understand the nuts and bolts of how it works. That's just asking for a big honkin' security hole to be left open on your PCs.
 

deputy_doofy

macrumors 65816
Original poster
Sep 11, 2002
1,466
410
I appreciate the responses. I don't want to download anything, since I want/need to be in full control of everything. I know it can be done, but my vb scripting is extremely limited. Guess it's time to buy some books again... :)
 

mags631

Guest
Mar 6, 2007
622
0
Look into Windows PowerShell (Link). It's runs under XP SP2 and it is a free download from MS. The reason to use PowerShell is to be able to interact with the .NET framework which will make it much easier on you to accomplish what you are trying to do.

For the .NET portion, look at the documentation for:
System.OperatingSystem
System.Environment
System.IO.DriveInfo

Ideally, you could instantiate and look at a My.Computer.Info object. Not sure you can do this from within PowerShell, since it appears to apart of the Visual Studio platform. You could download VB Express (free) and write in this in VB and query this object, as an alternative to PowerShell...

And if you know where to look in the registry, then .NET will give you easy access to it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.