How can I script nvidia display setting changes?

4

3

I have my tv connected to my Windows XP pc's nvidia GeForce 8500 GT.

I am constantly switching between single display and clone display.

Is there a way to script these settings? I would be fine with writing a batch file or a .net program to do it.

When I want to use my tv I right click the nVidia tray icon -> nView Display Settings -> Clone -> TV + Acer Monitor

When I want to switch back to only my moniter, I right click the nVidia tray icon -> nView Display Settings -> Single Display -> Acer Monitor

Ronnie Overby

Posted 2009-08-01T20:58:48.983

Reputation: 411

I wish ATi's monitor switching was that streamlined. They make you pull up a five step wizard. – JamesGecko – 2009-08-02T07:52:46.233

Answers

2

Combined with AutoIT, AutoHotkey or a batch script, this PDF-document (Command Line Functions => Using DTCFG-Configuring the Desktop => DTCFG Desktop Configuration Commands) may be of great assistance.

From that I tried to create a simple AutoHotkey-script, but I am not sure if it works, nor if it does what you want.

single = 1
;----- Ctrl-F2, change to whatever you see fit
^F2::
;----- cloning to screen 2
if (single = 1) {
    run rundll32.exe NvCpl.dll`,dtcfg setview 1 clone,,Hide
    single = 0
} else {
;----- back to primary only
     run rundll32.exe NvCpl.dll`,dtcfg setview 1 standard,,Hide
     currentMode = 2
}
return

Thor

Posted 2009-08-01T20:58:48.983

Reputation: 3 562

0

You can use displayswitch.exe, a tool that comes built-in with Windows 7,8,10.

It should be in c:\windows\system32

More command line details here: http://winaero.com/blog/switch-between-multiple-displays-monitors-directly-with-a-shortcut-or-from-the-command-line-in-windows-7-and-windows-8/

Fred

Posted 2009-08-01T20:58:48.983

Reputation: 11

0

You could use AutoHotkey or AutoIT script to make an automated version. The AutoIT documentation has an excellent guide on automating GUIs. (AutoHotkey probably has something similar, but I am not familiar with it)

Dan Walker

Posted 2009-08-01T20:58:48.983

Reputation: 8 869