Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Lots of people have posted about how on many nVidia cards you can only output to 2 of the 3 outputs. I was wondering if anyone has found a way to automate changing the outputs that are enabled..

I've tried Display Changer, but it only sees the two monitors that have last been enabled:

C:\Program Files (x86)\12noon Display Changer>dc64cmd.exe -listmonitors
Monitor: SONY TV XV
Device: \\.\DISPLAY1
Adapter: NVIDIA GeForce GTX 470
(1920 x 1080 x 32 bpp) 60Hz up, attached (1920,0)

Monitor: ASUS VW266H
Device: \\.\DISPLAY2
Adapter: NVIDIA GeForce GTX 470
(1920 x 1200 x 32 bpp) 59Hz up, attached, primary (0,0)

There is a 3rd monitor, another ASUS VW266H, that isn't listed here (but is shown in the Windows Screen Resolution dialog). I often switch between dual monitor, or one monitor and video playing on the TV.

I've also tried PowerStrip but can't figure out how to use it to enable and disable monitors... really confused by it.

I have AutoHotkey but haven't found any scripts that work.

Any suggestions? Something that could be scripted would be best - otherwise there's not as much benefit over the Windows dialog.


share|improve this question

I wanted to launch my movies/games on my TV and upon exiting return to my dual monitor setup, so I created a batch file (.bat) to do so, on Windows 7.

Create a text file (.txt) in the same folder as the program you want to launch, with this text:

@echo off
C:\Windows\System32\DisplaySwitch.exe /extend
start "" /WAIT "path\yourprogramnamehere.exe"
C:\Windows\System32\DisplaySwitch.exe /external

yourprogramnamehere.exe is the program file that you want to run on your external TV. path is the folder path to the file (e.g. C:\myfolder). Save the text file as .bat and then create a desktop shortcut to that .bat file, double click it and it should open up on your TV and return to your previous setup upon exit.

I found most of this information on XBMC forums.

Here are the other uses of DisplaySwitch.exe:

C:\Windows\System32\DisplaySwitch.exe /external
C:\Windows\System32\DisplaySwitch.exe /internal
C:\Windows\System32\DisplaySwitch.exe /clone
C:\Windows\System32\DisplaySwitch.exe /extend 
share|improve this answer

My apologies, this is more appropriate as a comment but I don't have the 'comment everywhere' privilege yet.

There's a lot that can be done with the windows script host. I used to dabble a lot with ActiveState's perl, which can give you direct access to the windows script host. For example, I was able to script adding/removing new printer drivers, printers, and related functionality in a manner similar to what you can do with dllrun.

In essence, you'd need to figure out what binaries are responsible for kicking off the change, what functions get called within them, and what parameters to pass to those functions. Then, in your perl script (or with dllrun) you can dynamically load the dll, and call the appropriate function(s).

share|improve this answer
Thanks for the idea - considering I've never used Windows Script Host, would you think this would be a simple or more complex task? – Chris Ashton Apr 28 '11 at 20:17
My suggestion hinges on a few things: the dll or exe containing the function(s) you need will have to be exported dynamically; either documentation exists for using those functions, or you have the technical skill to figure out what parameters the function(s) take; and you have enough skill with perl to hack this out. If that's the case, this shouldn't be much of an issue. Like I said though, this would be better submitted as a comment. – Brian Vandenberg Apr 28 '11 at 20:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .