+ Post New Thread
Results 1 to 3 of 3
Scripts Thread, Script help in Coding and Web Development; Hi chaps. Does anyone know of a way I can write a script to find out the name, and resolution ...
  1. #1

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,100
    Thank Post
    1,428
    Thanked 1,693 Times in 1,266 Posts
    Blog Entries
    2
    Rep Power
    364

    Script help

    Hi chaps.

    Does anyone know of a way I can write a script to find out the name, and resolution of all machines on my network, and have it output to a txt file or an excel spreadsheet?

    So far I have this which works fine locally, but comes up with a pop up, and it wont work if I want to run it from my machine or the server.

    Code:
    Set wshShell = WScript.CreateObject( "WScript.Shell" )
    strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
          WScript.Echo "Computer Name: " & strComputerName
    strComputer = "." 
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") 
    Set colItems = objWMIService.ExecQuery( _
        "SELECT * FROM Win32_DesktopMonitor",,48) 
    For Each objItem in colItems 
         Wscript.Echo "ScreenWidth: " & objItem.ScreenWidth
         Wscript.Echo "ScreenHeight: " & objItem.ScreenHeight
    Next

  2. #2


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,208
    Thank Post
    218
    Thanked 812 Times in 694 Posts
    Rep Power
    274
    network pc inventory script dosent so screen res but should help with the coding it generates 1 file per pc and is set to run as a startup script

  3. #3

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,100
    Thank Post
    1,428
    Thanked 1,693 Times in 1,266 Posts
    Blog Entries
    2
    Rep Power
    364
    unfortunately that pulls way too much info, and I need it literally just the resolutions. I have been asked to get a background out to everyone, but as some run laptops, some run desktops, some run win 7, some run win xp, some run vista, bit of a nightmare via GPO. Rather than go around 4 floors, and around 80 machines a floor, I figure a script is quicker, would output to a file, and make it easier for me to deploy as I can do it based on the resolution of everyone.

SHARE:
+ Post New Thread

Similar Threads

  1. PHP script help
    By FN-GM in forum Web Development
    Replies: 18
    Last Post: 19th August 2008, 02:52 PM
  2. Logon Script Help
    By djones in forum Scripts
    Replies: 17
    Last Post: 13th March 2008, 06:00 PM
  3. Proxy Authentication Script - HELP!!!!!
    By chrisa in forum Scripts
    Replies: 9
    Last Post: 7th March 2008, 04:34 PM
  4. AutoIt Script Help - Get Last Changed File
    By russdev in forum Scripts
    Replies: 8
    Last Post: 8th August 2007, 05:34 AM
  5. One PC refuses to run script! Help!!!
    By woody in forum Scripts
    Replies: 6
    Last Post: 5th October 2005, 11:37 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •