WARNING: CHANGING THE REGISTRY COULD MAKE YOUR COMPUTER UNUSABLE OR UNSTABLE.
Changing the desktop wallpaper Registry.
Changing the desktop wallpaper on a user's computer is very easy; basically the "HKEY_CURRENT_USER\Control Panel\Desktop\WallPaper" registry value must be edited. The "HKEY_CURRENT_USER\Control Panel\Desktop\WallPaper" registry value contains the full path to the image file that will be used as the desktop wallpaper.
The following file types are supported as wallpapers: *.bmp, *.gif, *.jpg, *.dib, and *.htm.
So in order to change the end use's desktop wallpaper simply use a Registry.SetValue action to set the value of "HKEY_CURRENT_USER\Control Panel\Desktop\WallPaper" to be the full path to your desktop file.
Example:
For example, here is a Registry.SetValue action that will set the desktop wallpaper to "C:\MyProgram\MyGraphics\Me.bmp":
Main key: HKEY_CURRENT_USER
Sub key: Control Panel\Desktop
Value name: WallPaper
Value type: REG_SZ
Value data: C:\MyProgram\MyGraphics\Me.bmp
Note: The changes will not take effect until the system is rebooted.
You can set the desktop wallpaper to use three different styles: Center, Tile, and Stretch. In order to apply those settings you will have to modify the value of the following two registry keys:
HKEY_CURRENT_USER\Control Panel\Desktop\WallpaperStyle
HKEY_CURRENT_USER\Control Panel\Desktop\TileWallpaper
In order to apply the styles use the following guide:
Center
WallpaperStyle = 0
TileWallpaper = 0
Tile
WallpaperStyle = 0
TileWallpaper = 1
Stretch
WallpaperStyle = 2
TileWallpaper = 0
MORE INFORMATION
KEYWORDS: Wallpaper, Background, Desktop, AutoPlay Media Studio 4.0, Registry.SetValue
Desktop Registry Settings
11/15/2007
Your shell can display specific desktop wallpaper by retrieving the current wallpaper registry values from the HKEY_CURRENT_USER\ControlPanel\Desktop registry key.
To specify the name of the wallpaper bitmap to retrieve, set the HKEY_CURRENT_USER\ControlPanel\Desktop\Wallpaper registry value to a string that is the path to the bitmap. The following registry key example shows how to set this registry value.
Copy Code
"Wallpaper": REG_SZ
To specify whether to tile the wallpaper bitmap, set the HKEY_CURRENT_USER\ControlPanel\Desktop\Tile registry value. Set this registry value to 1 to display the wallpaper bitmap as repeating tiles, set to 0 to display the bitmap normally. The following registry key example shows how to set this registry value.
Copy Code
"Tile": REG_DWORD
Finally, call PostMessage to post the message to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows. This call is shown in the following code snippet.
Copy Code
PostMessage(HWND_BROADCAST, WM_SETTINGCHANGE, SPI_SETDESKWALLPAPER, 0);
The system stores the usual background wallpaper bitmap in the HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper registry key. If you've enabled Active Desktop and selected a different background picture, such as a JPEG, the system stores this wallpaper in the HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\General\Wallpaper registry key.
As with a standard wallpaper, with the Active Desktop wallpaper, you can tile the wallpaper by setting the value TileWallpaper to 1, and you can center or stretch the wallpaper by setting the WallpaperStyle. A value of 0 centers the wallpaper; a value of 2 stretches it. When you first log on, the system displays the standard wallpaper until all processes start and the Active Desktop is enabled.
Please post back if you have more problems or questions.