Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Having recently upgraded to Windows 8, my script to retrieve the current desktop wallpaper image has broken.

For Windows 7, How could I find out the path to the current desktop image?, this works great. However, that registry key now always contains

C:\Windows\web\wallpaper\Windows\img0.jpg

What is the new registry key used for Windows 8?

I've found two possible solutions.

Firstly, this key contains what looks like a Base64 encoded path:

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers\Images\ID2

And then there is the "custom theme properties file" which also contains a "[SlideShow]" section which looks like Base64:

C:\Users\Scott\AppData\Local\Microsoft\Windows\Themes\Custom.theme
share|improve this question

4 Answers 4

up vote 5 down vote accepted

The two registry keys below both store the original path of the current wallpaper image:

HKEY_CURRENT_USER\Control Panel\Desktop\TranscodedImageCache
HKEY_CURRENT_USER\Control Panel\Desktop\TranscodedImageCache_000

They're in Unicode format, upon decoding that, one will have the full path to the current wallpaper image.

share|improve this answer
1  
Just a clarification for anyone messing around with this: the value contains non-string data in first 24 bytes, and the remaining data is a Unicode encoded, null-terminated (\0) string. Happy parsing. –  Nathan Taylor Jan 20 at 20:31

Check the HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper REG_SZ (string) value. This will show you the path to the TranscodedWallpaper.jpg currently in use.

share|improve this answer
    
Thank you! That pointed me to the correct registry location at least. I not only wanted the current wallpaper but the path to the original file (like Window 7 did), which is in the TranscodedImageCache entry. –  Scott Bennett-McLeish Nov 20 '12 at 22:56

In Windows 8 and 8.1 if You have set Your wallpaper form Windows Picture Viewer (by opening picture in viewer and clicking "Set as desktop wallpaper" in context menu), it's location will be "%AppData%\Roaming\Microsoft\Windows Photo Viewer\Windows Photo Viewer Wallpaper.jpg"

share|improve this answer

For windows 8 you can launch this vbs file:

https://gist.github.com/raveren/ab475336cc69879a378b

Or use this autohotkey script:

http://www.autohotkey.com/board/topic/111813-open-current-wallpaper-under-mouse-in-windows-8/

Both created by me.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.