Link to home
Start Free TrialLog in
Avatar of speechlys
speechlys

asked on

script to capture user screen res and printers

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
Avatar of Rich Rumble
Rich Rumble
Flag of United States of America image

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
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
Avatar of speechlys
speechlys

ASKER

ok thanks, what about printers ?
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
i want the installed printers of the user to output to a text file or any other format! this will do that?
ASKER CERTIFIED SOLUTION
Avatar of Rich Rumble
Rich Rumble
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial