Changing wallpaper with batch file
Posted: 16 Mar 2010, 02:25
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
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