Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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:


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

share|improve this question
up vote 8 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
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 '14 at 20:31
In powershell, it's [System.Text.Encoding]::Unicode.GetString($bytes[24..($bytes.length-1)]), assuming $bytes contains the value of the key – NextInLine Feb 10 '15 at 21:39

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
  1. Go to Windows Run Command (WinLogo+R)
  2. Type in: %AppData%
  3. In the 'Roaming' folder, go to 'Microsoft', then 'Windwows', then 'Themes', and lastly 'CachedFiles'
  4. Copy the wallpaper file.
share|improve this answer
This is so straightforward and quick. I grabbed the file, changed the extension to .jpg and there it was. – valsidalv Nov 6 '15 at 18:42

For windows 8 or later you can launch this vbs file:

Or use this autohotkey script:

Both created by me.

share|improve this answer

In Windows 8 and 8.1 (and, reportedly, 10), if you have set your wallpaper from Windows Picture Viewer (by opening a picture in Viewer and clicking "Set as desktop wallpaper" in the context menu), its location will be

%AppData%\Roaming\Microsoft\Windows Photo Viewer\Windows Photo Viewer Wallpaper.jpg
share|improve this answer

Your Answer


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.