Find Path to Current Desktop Image in Windows 8 – How to Guide

desktop-customizationwindows 8

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

Best Answer

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.

Related Question