Archive: Quick question


Quick question
Hi all, quick question that I hope someone can answer for me, I'm putting together a installer that will load up various elements of a theme pack I'm putting together, winamp skin, dfx skin etc etc, but I'm struggling to work out how to install and set a new windows wallpaper?

Can this be done?, I can extract it to a temp directory, but how would I get NSIS to set it as the default wallpaper?

Any ideas?

Thanks in advance


The wall paper setting is stored in the registry in HKCU/Control Panel/Desktop

There are several settings relating to the wall paper in there.


Ohhh now your loosing me heh, care to elaborate on how I do that in NSIS?


Hi!

Here is an example of how to change the wallpaper

WriteRegStr HKCU "Control Panel\Desktop" "Wallpaper" "C:\New Wallpaper.bmp"
WriteRegStr HKCU "Control Panel\Desktop" "WallpaperStyle" "2"
WriteRegStr HKCU "Control Panel\Desktop" "TileWallpaper" "0"
or
WriteRegStr HKCU "Control Panel\Desktop" "TileWallpaper" "1"


I don't really remember which number is which style in WallpaperStyle, so you should test it on your own.

KiCHiK

Thanks for that, works a treat, installs and sets the reg keys, only snag is it dosn't refresh and set it right off, guess thats a fault with winbloze rather than NSIS.


Hmmm, back to the drawing board, thanks for the heads up tho folks :)


I am pretty sure there is some Message you can send to Windows to refresh the background. Look it up.

KiCHiK