Archive for März, 2010

Switching Multidisplay Setups with Ultramon

Sonntag, März 14th, 2010

In Windows 7 Ultramon has problems switching between different multimonitor setups.
If you are running 3 displays and want to switch between a setup where Display 1 and 2 are active to a setup with 1 and 3 active this is not possible.
You first have to switch back to one active display and then activate the second profile.

This batch script switchMon.bat does this automatically for you.

	@ECHO OFF

:: START CONFIGURATION
	SET ultramonDir=C:\Program Files\UltraMon\
	SET profileDir=C:\Users\{UserName}\AppData\Roaming\Realtime Soft\UltraMon\3.0.10\Profiles\

	SET resetProfile=oneDisplay.umprofile
	SET profile1=FirstSetting.umprofile
	SET profile2=SecondSetting.umprofile

:: END   CONFIGURATION
:: DO NOT EDIT BELOW THIS LINE

:: delims is a TAB followed by a space
	FOR /F "tokens=2* delims=	 " %%A IN ('REG QUERY "HKCU\SOFTWARE\SwitchMon" /v current') DO SET current=%%B

	IF "%current%" == "2" GOTO set1
	IF "%current%" == "1" GOTO set2
	IF "%current%" == ""  GOTO set1
	GOTO setFinish

:set1
	SET current="1"
	SET curProfile=%profile1%
	GOTO setFinish
:set2
	SET current="2"
	SET curProfile=%profile2%
	GOTO setFinish

:setFinish
	::Save new state in the registry
	REG ADD "HKCU\SOFTWARE\SwitchMon" /v current /d %current% /f

	::Save desktop shortcuts
	"%ultramonDir%UltraMon.exe" /s

	::Reset to one display
	"%ultramonDir%UltraMonShortcuts.exe" /l "%profileDir%%resetProfile%"
	ping -n 1 127.0.0.1>nul
	::Activate new profile
	"%ultramonDir%UltraMonShortcuts.exe" /l "%profileDir%%curProfile%"
	ping -n 1 127.0.0.1>nul
	::Restore desktop shortcuts
	"%ultramonDir%UltraMon.exe" /r

You can define three profiles in the configuration part.
In the variables profile1 and profile2 you can define the two target profiles you want to switch between.
Resetprofile is set to a profile where just one display is active.
Additionally the Ultramon Directory and the directory your profiles are stored have to be set.

The script works a follows:

  • The current configuration is read from the registry
  • The next profile is determined and the future state is store in the registry
  • The current position of desktop icons is stored
  • The resetProfile is applied
  • After a short waiting time the new Targetprofile is applied
  • And at last the desktop icons are reset

Further information regarding this issue you can find in the UltraMon Forums: http://www.realtimesoft.com/multimon/forum/messages.asp?Topic=10658&tmpl=UltraMon

I have 3 Monitors intalled on an ATI 5750.
Two on DVI and one on HDMI.
The Graphiccard support only two Displays at a time, so I want to switch between two of the Displays.
My Goal is to have an extended Desktop on 1 and 2 and switch by a click to 2 and 3.

Unfortunately does a switching with the display profiles not work when already two monitors are activated. When switching to another profile just the display resolution is changed, but not the active displays.

I found a solution to the problem when first setting back to one active display and then switching to the second profile.

Is there another solution to this problem without haveing to change the profile twice?