I’m working on a tool that needs to get the current user’s wallpaper path.
On Windows 7, I can get that by reading
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\General\WallpaperSource.
On my Windows 8 installation, that key always has the value
C:\Users\Peter\AppData\Roaming\Microsoft\Windows Photo Viewer\Windows Photo Viewer Wallpaper.jpg
which is not even the wallpaper that’s currently set.
Is there any other key I can rely on?
The key you are mentioning isn’t the correct one. Sounds to me that you’ve placed an image as your desktop background from Internet Explorer, and that key was opened to register it.
The correct key to get the desktop background location is: Confirmed on: XP, CE, Vista, 7, 8
Details:
Also, under
HKEY_CURRENT_USER\Control Panel\Desktop\you will find other wallpaper related options to apply different styles: Center, Tile, and Stretch.In order to apply the styles use the following guide:
Center
Tile
Stretch