Solved

script to capture user screen res and printers

Posted on 2012-03-23
6
450 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
  • 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
Are end users causing IT problems again?

You’ve taken the time to design and update all your end user’s email signatures, only to find out they’re messing up the HTML, changing the font and ruining the imagery. What can you do to prevent this? Find out how you can save your signatures from end users today.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
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…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now