Hi,
I'm not quite sure that this is the right place so please feel free to move this tread.
Well my idea here is to utilize the Catalyst profile changer's ability to run a command or program when you change profile.
Any who my idea was to run the following .bat file when changing to Extended mode:
@echo off
REG ADD "HKCUControl PanelDesktop" /v Wallpaper /t REG_SZ /d "D:ImagesOthersWallpaperscurrentEXTE.jpg" /f
And this one when changing to Eyefinity mode:
@echo off
REG ADD "HKCUControl PanelDesktop" /v Wallpaper /t REG_SZ /d "D:ImagesOthersWallpaperscurrentEYEF.jpg" /f
The reason for all this hassle is that when I'm in extended mode I use my center monitor as the primary monitor and Windows 7 is so cleaver that it thinks that this is where the wallpaper should start so the left most part of the picture is actually in the center and the right most part is on the left monitor. Hope fully you understand me, I can provide screenshots if you guys like to.
My batch solution works, well it almost works... it does change the wallpaper selected, but I still need to find some way to refresh the desktop... simple F5 won't do the trick here.
Even if I go to "Personalize" it shows that the wallpaper has changed...
Any ideas?
Regards
Oskar
EDIT: Spelling error
Changing wallpaper with batch file
Re: Changing wallpaper with batch file
I've got something along these lines working - I've got my catalyst profiles calling VB script files to change the Theme. The Control Panel's Personalize menu pops up briefly, but with all the screens flashing on and off when changing from eyefinity to extended and back it's not too much of an issue. I simply created 2 themes, one that uses a set of 1920x1080 background images, and one with 5760x1080 images.
Wscript.Sleep 5000
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "rundll32.exe %SystemRoot%system32shell32.dll,Control_RunDLL %SystemRoot%system32desk.cpl desk,@Themes /Action:OpenTheme /file:""C:UsersMattAppDataLocalMicrosoftWindowsThemesEyefinity.theme"""
Wscript.Sleep 1600
WshShell.AppActivate("Desktop Properties")
WshShell.Sendkeys "%FC"
WshShell.Sendkeys "{F4}"
Wscript.Sleep 5000
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "rundll32.exe %SystemRoot%system32shell32.dll,Control_RunDLL %SystemRoot%system32desk.cpl desk,@Themes /Action:OpenTheme /file:""C:UsersMattAppDataLocalMicrosoftWindowsThemesEyefinity.theme"""
Wscript.Sleep 1600
WshShell.AppActivate("Desktop Properties")
WshShell.Sendkeys "%FC"
WshShell.Sendkeys "{F4}"
-
techmaniac
- Posts: 1
- Joined: 26 Feb 2011, 04:11
Re: Changing wallpaper with batch file
Do you know if the script works for Vista the same? I'm running Vista U x64
Who is online
Users browsing this forum: Semrush [Bot] and 4 guests
