Solved

script to capture user screen res and printers

Posted on 2012-03-23
6
477 Views
Last Modified: 2012-05-23
Hi,

Does anyone know if it is possible to script what a users screen resolution is and what printers they have installed and output that information to a text file?

The reason behind it is new user profiles and I want to capture this information, I have scripted other things but just need help with this part if it is possible in anyway?

doesnt have to be a text file it outputs to, can be any other file or automated method!

many thanks
0
Comment
Question by:speechlys
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 38

Expert Comment

by:Rich Rumble
ID: 37759581
You can do this with WMI, via a command line or a script, command line would be:
(open cmd prompt)
wmic path Win32_DisplayConfiguration get PelsHeight,PelsWidth

You have to be administrator to get it from a remote machine like:
wmic /node:pc_name.example.com path Win32_DisplayConfiguration get PelsHeight,PelsWidth
(replace pc_name... with the pc's name, or IP address)

Here is a similar script you can have in the user's "startup" folder
http://blogs.technet.com/b/heyscriptingguy/archive/2005/07/21/how-can-i-determine-the-current-screen-resolution-being-used-on-a-computer.aspx
-rich
0
 
LVL 38

Expert Comment

by:Rich Rumble
ID: 37759601
Redirect the output to a file like this
wmic path Win32_DisplayConfiguration get PelsHeight,PelsWidth >C:\temp\resolution.txt
or any path you choose. Same with the VBS script from the link...
cscript resolution.vbs >c:\temp\resolution.txt
-rich
0
 

Author Comment

by:speechlys
ID: 37777635
ok thanks, what about printers ?
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 38

Expert Comment

by:Rich Rumble
ID: 37777782
wmic printer get HorizontalResolution,VerticalResolution,name
That will give you the printers resolution. Just run both commands from a .bat file (batch file) one on one line the second on the next line.
-rich
0
 

Author Comment

by:speechlys
ID: 37777812
i want the installed printers of the user to output to a text file or any other format! this will do that?
0
 
LVL 38

Accepted Solution

by:
Rich Rumble earned 500 total points
ID: 37778081
Did you try the command? It outputs the following:
C:\Windows\system32>wmic printer get name,drivername,Description,HorizontalResolution,VerticalResolution
Description  DriverName                     HorizontalResolution  Name                           VerticalResolution
             Microsoft XPS Document Writer  600                   Microsoft XPS Document Writer  600
             HP Officejet 6300 series       600                   HP Officejet 6300 series       600
             Microsoft Shared Fax Driver    200                   Fax                            200

Open in new window


C:\Windows\system32>wmic printer where "default='TRUE'" get name
Name
HP Officejet 6300 series

You can do "wmic printer get /?" on a command prompt to find all the available items.
You could also download the Scriptomatic 2.0 from M$ and start playing with that, it creates all the code you'd need for the most part.
-rich
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Determining the an SCCM package name from the Package ID
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question