Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Other Programming Languages (http://www.programmingforums.org/forum38.html)
-   -   Detect number of monitors (http://www.programmingforums.org/showthread.php?t=14975)

PhilBon Jan 18th, 2008 6:41 PM

Detect number of monitors
 
I was wondering if anyone has an idea on how to detect the number of monitors that are attached to a remote system.

ZenMasterJG Jan 18th, 2008 8:34 PM

Re: Detect number of monitors
 
Operating system? Programming language? Any details at all?

PhilBon Jan 18th, 2008 9:01 PM

Re: Detect number of monitors
 
I'm sorry. It's windows XP and the programming language will be vb.net/vbscript unless there is an easier way in another language.

Jabo Jan 19th, 2008 1:27 AM

Re: Detect number of monitors
 
vb 2005 xpress
:

  1. My.Computer.Screen.AllScreens


PhilBon Jan 19th, 2008 5:35 AM

Re: Detect number of monitors
 
Is there a way to do that to a remote computer. I'd have administrative rights on the remote and local computer.

Dameon Jan 19th, 2008 4:13 PM

Re: Detect number of monitors
 
PsExec from Microsoft (prev. Sysinternals) is great for that sort of thing. It will copy over your script/program to the remote machine, run it, and redirect the standard input/output streams back to you. It's a terrible hack to get some of the functionality so common on just about every other OS.

This may be easier with WMI. I'm looking in to that right now.

Ancient Dragon Jan 19th, 2008 4:30 PM

Re: Detect number of monitors
 
Quote:

Originally Posted by PsExec
Note: some anti-virus scanners report that one or more of the tools are infected with a "remote admin" virus. None of the PsTools contain viruses, but they have been used by viruses, which is why they trigger virus notifications.

Just as I thought. I wouldn't trust anyone using that program on my computer without my knowledge. PsExec = Evil :scared:

Dameon Jan 19th, 2008 4:47 PM

Re: Detect number of monitors
 
Quote:

Originally Posted by Ancient Dragon (Post 139917)
Just as I thought. I wouldn't trust anyone using that program on my computer without my knowledge. PsExec = Evil :scared:

If 'they' without your knowledge have access to the admin$ share and can remotely start services, you're already in trouble. PsExec is just convenience. Domain admins and such should have those privileges.

Anyway, WMI may do the trick for you.

Take a look at http://technet.microsoft.com/en-us/l.../bb742610.aspx

wmic /user:"MACHINE\User" /node:MACHINE desktopmonitor where availability!=8 get description, screenwidth, screenheight

I used that on my home network to get info about the monitors seemingly plugged in (availability not offline) on a remote machine. The user switch would be unnecessary in a domain environment. It looks like you should be able to specify multiple machines and specify a choose a convenient output format such as HTML or CSV. Should do the trick.

PhilBon Jan 19th, 2008 5:44 PM

Re: Detect number of monitors
 
@dameon: Is there any way to just return the count of how many?
@Ancient Dragon: If you are a user in a network with a computer. There are far more ways than just pxexec for Admins to run on your computer and chances are if they are running it on your computer it's for a specific reason and not someone trying to screw it up.


All times are GMT -5. The time now is 4:01 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC