Batch file to enable: Extend my Windows desktop to my 2nd...
Moderator: DosItHelp
Batch file to enable: Extend my Windows desktop to my 2nd...
Batch file to enable: Extend my Windows desktop to my 2nd monitor. I have a lot of users when they remote in, and when they come back they will only see 1 monitor. Is it possible to crate a batch file to automate this?
Re: Batch file to enable: Extend my Windows desktop to my 2n
Hi anoble1,
Don't know the regKey/s that control that but u should be able to figure it out.
Another less gentle way to try apply the new setting is terminating explorer.EXE then restarting it.
Don't know the regKey/s that control that but u should be able to figure it out.
- download regmon.EXE
- go to display properties where you enable the setting but don't enable it just yet.
- create a registry snapshot with regmon.
- now enable that setting and press ok.
- create another snapshot with regmon.
- run 'compare snapshots' with regmon, you now should have the key/s that has/have changed
( you'll often get more than one key, but only one of them should be the one ) - now manually change the keys to test if you've got the right one
( you'll have to relogon to see the effect ) - Now write a batch that changes the key
- Not sure if it'll work but try this to apply the setting without logging of and on:
Code: Select all
Rundll32.exe user32.dll,UpdatePerUserSystemParameters
Re: Batch file to enable: Extend my Windows desktop to my 2n
Maybe VBScript
ps: normally I'd use taskList.EXE /nh /v /fo csv /fi "windowTitle eq Display Properties" instead of WScript.Sleep( 1000 ) but I'm feeling lazy :p
see ya,
Code: Select all
Dim oWSH : Set oWSH = WScript.CreateObject( "WScript.Shell" )
oWSH.Run( "%systemroot%\system32\control.exe desk.cpl,@0,3" )
WScript.Sleep( 1000 ) : ' Give Display Properties time to load
oWSH.AppActivate( "Display Properties" )
oWSH.SendKeys( "{TAB}" )
oWSH.SendKeys( "2" )
oWSH.SendKeys( "%W" )
oWSH.SendKeys( "{ENTER}" )
WScript.Quit( 0 )
see ya,