Announcement

Collapse
No announcement yet.

script to collect PC info (SWs,Drivers,OS..)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • script to collect PC info (SWs,Drivers,OS..)

    Hello all,
    I need to build script that collect info about the PC.
    This should be work on XP,2003 & Vista.
    I work with file R.bat that I made.
    I'm looking for the DOS command for it. since it the basic level for all OS's.

    About SW installed: I display the dirs in "c(or d):\Program Files\" by dir cmd, is there any better way that return also the version?

    About Users:How can I know the name of all users that installed on the PC?

    About drivers: Do you know a command for it?

    And other issue like: Motherboard, Display, Storage, Partitions, Inputs, Network, Peripherals, BIOS, Property, System Properties, Motherboard Properties and Chassis Properties.

    Is there any site with a commands regard it?

    Thanks all to your help,

  • #2
    Re: script to collect PC info (SWs,Drivers,OS..)

    I would try using WMI script.
    The commands are really not that hard, just time consuming to implement.

    Put it in a batch script and to do these things remotely you could use psexec.

    net view | find /i "\\" >hosts.txt
    for /i %%i in (hosts.txt) do (
    psexec %%i hostname
    wmi command
    wmi command
    )

    something like the above would work, could take a few hours to create.
    Please give points where appropriate

    <I dont create ready scripts for you, but I'm willing to point you in the right direction>

    Comment


    • #3
      Re: script to collect PC info (SWs,Drivers,OS..)

      Originally posted by Silver23 View Post
      for /i %%i in (hosts.txt) do (
      psexec %%i hostname
      wmi command
      wmi command
      )
      You know, instead of psexec, one can make remote WMI queries. Just pass the computer name along. In VBScript you can do like this:

      Code:
      GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
      -vP

      Comment


      • #4
        Re: script to collect PC info (SWs,Drivers,OS..)

        vonPryz has a good point.
        I really suck at WMI, so I'd have to look up everything on Technet.

        But you dont need VBscript to do that.
        I was kind of trying to keep it simple.

        Use wmic /? for a full commandline,

        If you like vbscript better use that.
        you can also user powershell

        example for a wmi command, this queries a logical disk:
        WMIC logicaldisk WHERE drivetype=3 GET name,freespace,SystemName,FileSystem,Size,VolumeSe rialNumber

        add (/Node: "computername") to do this on a different computer.

        so looking at my previous post; wmi command would be replaced by
        wmic /node:%%i


        Look here for some commands to get you started
        http://support.microsoft.com/service...ampleusage.asp

        technet also as a full database with explanations of WMI commands.
        Last edited by Silver23; 17th November 2009, 16:30.
        Please give points where appropriate

        <I dont create ready scripts for you, but I'm willing to point you in the right direction>

        Comment

        Working...
        X