get path to current desktop wallpaper

2.5k views Asked by At

As mentioned in the title, I want to get the path to the current desktop wallpaper (in C++). I tried to use SystemParametersInfo with SPI_GETDESKWALLPAPER. But this only returns this:

%AppData%\Microsoft\Windows\Themes\TranscodedWallpaper

What I really need would be something like this:

C:\User\...\image.png

Is there any way to achieve this?

2

There are 2 answers

4
Artavazd Balayan On

There is registry hive HKEY_CURRENT_USER\Control Panel\Desktop. It has value with name Wallpaper. It contains the path to the current wallpaper.

0
Andrey Shvidky On

You can go to HKEY_CURRENT_USER\Control Panel\Desktop section of your registry and find six recent files transcoded to TranscodedWallpaper. There names

  • TranscodedImageCache
  • TranscodedImageCache_000
  • TranscodedImageCache_001
  • TranscodedImageCache_002
  • TranscodedImageCache_003
  • TranscodedImageCache_004

Basically, it can be read without any tools: Here it looks like But it can be converted to more readable view with any tool capable to show unicode text