Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

script to capture user screen res and printers

Posted on 2012-03-23
6
Medium Priority
?
492 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
Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

 
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 2000 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

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

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

Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

688 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