Path to current desktop backgrounds in Windows 10?

73

35

There is another question on here that allows users to find the path to their current background image through a cmd command.

How could I find out the path to the current desktop image?

In Windows 10 this no longer works. It only returns the first image in the folder, it does not change with the backgrounds as they transition. I need a similar command that returns the path(s) to the current image on the desktop background(s) that actually works in Windows 10 if one exists.

cujo

Posted 2015-09-03T04:17:49.440

Reputation: 790

Answers

118

A copy of the current wallpaper can be found by typing the below path in Windows File Explorer address bar.

Path 1 -
%AppData%\Microsoft\Windows\Themes\CachedFiles

If you don’t find a copy of your current desktop background image here, try below path instead.

Path 2 -
%AppData%\Microsoft\Windows\Themes\TranscodedWallpaper

Note: The file TranscodedWallpaper in Path 2 does not have a file extension. Use "Open With" or "How do you want to open this file?" dialogue box and select any image viewer, such as, "Windows Photo Viewer", "Honeyview" or the "Photos" app.

Note for Windows 10: The above locations have limitations. For example, if the wallpaper you’re looking for is no longer visible in the ‘Background’ tab in the Settings app, you can’t recover it. It will work for your last five wallpapers but nothing older. (Source)

Default Windows wallpapers can be found in

%SystemRoot%\Web

You will see 3 folders

  • "4K" for 4K wallpapers,
  • "Screen" for lock screen backgrounds, &
  • "Wallpapers" for Default Windows wallpapers

Installed themes (Aero, etc):

%SystemRoot%\Resources\Themes

Per-user installed themes (including pre-installed from OEM):

%LocalAppData%\Microsoft\Windows\Themes  

If you are looking for the location of Lock Screen images - visit this SuperUser question.

Personally, I use John's Background Switcher to manage my desktop background.

John's Background Switcher has an option to view the current/previous desktop background (set by the app itself). Follow below steps -

  1. Right click on the tray icon and select View Current Picture and the current desktop background opens in Windows Photo Viewer (or your default image viewer).
  2. In Windows Photo Viewer, you can right click on the image & select Open File Location to view the original location of current desktop background in windows File Explorer.

To activate Windows Photo Viewer in Windows 10 visit this article on HowToGeek

xypha

Posted 2015-09-03T04:17:49.440

Reputation: 2 434

The issue with the switcher is that i need a python script to be able to poll the path. The previous command worked beautifully in windows 7. Also that new path doesnt even exist on my windows 10 machine. – cujo – 2015-09-24T14:33:48.017

added a second path – xypha – 2015-09-24T16:35:00.517

Its not what I hoped for since now I have to watch file properties for changes, but it does work. Thank you – cujo – 2015-09-24T17:03:30.743

This method doesn't provide the location of the original photo, but rather the copy that Windows makes in preparation for display. – Edward Brey – 2018-10-26T16:06:59.133

@Edward Brey - Use John's Background Switcher (or several other switchers/downloaders) to switch wallpapers and to find original location. To the best of my knowledge, Windows 10 does not natively support it. Maybe raise it as a feature request in Microsoft Feedback

– xypha – 2018-11-02T10:41:32.117

11

I have Windows 10, version 1709. One of the other answers got me looking in the registry and I found exactly what I needed in clear text at

HKEY_CURRENT_USER\Control Panel\Desktop\WallPaper

No decoding needed.

Jim

Posted 2015-09-03T04:17:49.440

Reputation: 323

I use Bing Desktop to change wallpapers. I was able to find the path to those wallpaper images using this. Thanks! – anacron – 2018-11-22T06:59:57.313

4

Windows 8 and 10 still store the original path of the current background image - rather than the cached / transcoded file as in xypha's answer:

HKEY_CURRENT_USER\Control Panel\Desktop\TranscodedImageCache

Microsoft doesn't want things to be easy though: this isn't plain text so you have to decode it from binary.

The Winhelponline website has compiled a couple of scripts (VBA and PowerShell) which can print the image name, and launch Explorer to point to the image file.

http://www.winhelponline.com/blog/find-current-wallpaper-file-path-windows-10/

Iain S

Posted 2015-09-03T04:17:49.440

Reputation: 213

1This does not work with multiple displays. Unverified with a single display. – cujo – 2017-05-02T02:18:22.443

Have you checked all the registry locations in that article? – w32sh – 2019-04-22T07:48:28.593

This was what really helped me find the file. – zeycus – 2020-02-13T11:49:16.020

0

You don't explain exactly what you want to achieve, so I can give some tips here based on a guess: you want to change your wallpaper in certain conditions (for example, one wallpaper every time you restart your computer) or to use a custom file as wallpaper.

In Windows 7 the wallpaper was usually found in %AppData%\Microsoft\Windows\Themes\TranscodedWallpaper.
In Windows 10 you will find it in %AppData%\Microsoft\Windows\Themes\CachedFiles.

You can also interrogate the registry at

HKEY_CURRENT_USER\Control Panel\Desktop\TranscodedImageCache

but note the warnings below about programs that are NOT writing a file to disk!

If you want to build your own CMD script, this might be unreliable IF you set the wallpaper not from Windows but from an external program. For example, if I see a nice image in my browser, I set it as wallpaper directly from there. Same for IrfanView. I can easily name another 10 popular programs that could change the wallpaper to a custom path.

Note that some programs are changing the wallpaper without actually writing a file to disk. This can be done by hooking to the Microsoft Windows Desktop window and drawing directly on its canvas. This is how GIF/AVI animations are drawn on desktop.

There is another issue if you build your own script: How to you handle images that don't have same aspect ratio as your desktop, or when desktop resolution changes?

The solution (if I guessed your problem correctly) would be to use a program like John's Background Switcher or BioniX Desktop Background Changer. The latter is much more customizable and can be controlled via command line. It also has auto-detection to detect the best way to resize the image (fill/fit/tile). BioniX can also draw GIF without writing anything to disk (as explained above).

A even better way would be to use the "Lock on folder" option. Set BioniX to change your wallpaper every 60 seconds (don't worry, you won't see a new wallpaper every 60 seconds since you will use only one file). Set BioniX to lock on any folder (let's say C:\Wallpapers). Inside that folder you put a single file called something like My Wallpaper.jpg. BioniX will use that file as wallpaper every 60 seconds. Now, every time you want to change the wallpaper you replace the old My Wallpaper.jpg with your new file. BioniX will see the change you have done to the folder and apply the new file (within 60 seconds).


Let us know what you want to achieve with your script to get a better solution.

Ultralisk

Posted 2015-09-03T04:17:49.440

Reputation: 1 749

1The question states that I am looking for the path to the current file, not looking to actively set it. That is pretty clear in my opinion what I am trying to achieve. Your solution only talks about setting it programmatically not if it returns the path. – cujo – 2017-11-29T16:16:57.170

1@cujo - And my answer also tells you where to find the file - and gives you some warnings about your approach. – Ultralisk – 2017-11-29T16:25:31.127

I'm referring to"the solution" as your answer does not focus primarily on what the question asked and more on dynamically programming the environment – cujo – 2017-11-29T16:27:22.837

I read your answer, it adds no new information as to the location of the files that hasn't already been presented. And you talk about issues that do not matter. And the problems you present are outside the scope of the question. A path is a path, the aspect ratio does not matter. – cujo – 2017-11-29T16:34:28.283

It's pretty clear, I require the path to the file that is currently drawn on the background, that is it. I did not mention any image processing or placing new images into the system. – cujo – 2017-11-29T16:39:23.803

2@Empire - The scope of this 2 year old question, with an accepted answer, seems clear to me. The question was, "I need a similar command that returns the path(s) to the current image on the desktop background(s) that actually works in Windows 10 if one exists." which the accepted answer provided ( i.e. %AppData%\Microsoft\Windows\Themes\CachedFiles) – Ramhound – 2017-11-29T16:43:25.953

@Empire - You are responding to the author of the question, cujo, I am pretty sure the author knows what their actual question was. – Ramhound – 2017-11-29T16:44:11.743

I politely posted that your current wallpaper might not be stored to disk. – Ultralisk – 2017-11-29T16:44:35.027

0

To get the "Transcoded" PATH in cleartext, do this in PowerShell:

$TIC=(Get-ItemProperty 'HKCU:\Control Panel\Desktop' TranscodedImageCache -ErrorAction Stop).TranscodedImageCache
[System.Text.Encoding]::Unicode.GetString($TIC) -replace '(.+)([A-Z]:[0-9a-zA-Z\\])+','$2'

not2qubit

Posted 2015-09-03T04:17:49.440

Reputation: 1 234