cascadefx has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Guys-

I've got a big one for you (or small... how the heck would I know since I am new to this stuff).

The university that I work for is looking to find an easy way to check the configuration information of its windows hosts. All this information would later be entered into a database for ease of use and so forth.

I was wondering if anyone has written (or knows of) any scripts that would gather some or all of the following information (once run) from a Windows 95, 98, Me, NT or 2000 system (and write it to a file that could be stored or easily read with Notepad or something):

  1. Username of person logged in
  2. Operating System of computer
  3. Version of OS (SR levels)
  4. Architecture of system (intel etc)
  5. Processor type (Pentium etc)
  6. IP address
  7. MAC address
  8. Does it use DHCP or does it have a statically assigned IP?
  9. List of Peripherals (Hard Drives (including size) memory amount, zip drive, etc)
  10. Does it have (and what versions) MS Office, Internet Explorer, Netscape, Outlook, and/or GroupWise installed?
  11. Anything else that might be pertinent to the situation.

Thanks for any help in advance...

  • Comment on Microsoft Windows Configuration/Assett Management Using Perl

Replies are listed 'Best First'.
(tye)Re: Microsoft Windows Configuration/Assett Management Using Perl
by tye (Sage) on Mar 31, 2001 at 09:55 UTC

    Much of this can be had relatively easily via built-in remote queries such as remote Registry access using Win32::TieRegistry and remote file system access, at least for WinNT and beyond. I'm not sure whether remote access to the Registry requires installation/configuration of optional items for Win9x.

    Yeah, I know, short on details. Sorry, I don't memorize these things but I usually have little trouble figuring them out when I have to. I don't think it'd take too much digging to find many of these things pretty reliably.

            - tye (but my friends call me "Tye")
Re: Microsoft Windows Configuration/Assett Management Using Perl
by myocom (Deacon) on Mar 31, 2001 at 04:14 UTC

    It's not Perl, but hardware and software inventory are among the features of Microsoft's Systems Management Server. While SMS has some annoying things about it, it's pretty robust and should be able to determine all of your information for you.

    Having said that, a fair number of those items could be determined through a Perl script, but I'm not sure that all of them could. Dave Roth's Win32 Perl Pages would be a good place to start.

      Well I know you're not going to like this answer either, but I would serisously reccomend against using perl for this. Windows machines, by deafult, do not come with a perl complier installed. If you're using them as workstations, I doubt you've installed perl on every one. (if you are installing perl on them, I hope you understand the security implications) But for this sort of thing to work thru perl, you'd have to install perl on each machine then run the script (quite possibly run it manually from each machine). Just making sure you understood this ;-)
        That's not true, you only need to have Perl installed on one machine - the machine that checks all the others. I have written scripts that read remote windows registries and check sytem config on other windows machines that do not have Perl installed.

        Even if this were the case, it is possible to run perl scripts using the perl interpretter on a network share.

        $ perldoc perldoc