Windows XP scripting questions...

Discussion in 'Windows, Linux & Others on the Mac' started by deputy_doofy, Jun 15, 2007.

  1. deputy_doofy macrumors 65816


    Sep 11, 2002
    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.
  2. mark-itguy macrumors regular

    Mar 22, 2007
    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.
  3. Westside guy macrumors 603

    Westside guy

    Oct 15, 2003
    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.
  4. deputy_doofy thread starter macrumors 65816


    Sep 11, 2002
    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... :)
  5. mags631 Guest

    Mar 6, 2007
    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:

    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.

Share This Page