Built-in wallpapers
A copy of the current wallpaper can be found by entering one of the below paths in Windows Explorateur de fichiers barre d'adresse.
Some of the paths below may not exist on your PC, and that's OK; move on to the next path.
Path 1 -
%AppData%\Microsoft\Windows\Themes\CachedFiles
Path 2 -
%AppData%\Microsoft\Windows\Themes\TranscodedWallpaper
Note: TranscodedWallpaper does not have a extension de fichier, even though it is a JPEG image file.
To view the image in a imager viewer,
- Clic droit on the file and use "Open With" option
(or)
select the image and appuyez sur Entrée
- Cela va bring up the "Select an app to open..." or "Comment want to open this file?" dialogue box.
Any popular image viewer should work - such as the "Windows Photo Viewer" (built-in), Microsoft Photos app, PicView, qView, etc..
Sinon, drag and drop the file into a Firefox tab or mspaint window to view/edit.
Note for Windows 10/11: The above wallpaper paths comes with limitations.
Par exemple, 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. [1]
Path 3: Default Windows wallpapers -
%SystemRoot%\Web
Check in one of the below folders -
"4K" for 4K wallpapers
"Screen" for écran de verrouillage backgrounds
"touchkeyboard" for colorful abstract backdrops in Windows 11 [2]
"Wallpapers" for default Windows wallpapers
Path 4: Wallpapers from installed themes (Aero, etc.) -
%SystemRoot%\Resources\Themes
Path 5: Wallpapers from per-user installed themes (including pre-installed themes from OEM) -
%LocalAppData%\Microsoft\Windows\Themes
Desktop background set by Windows Photo Viewer
Path 6 - [21]
%AppData%\Microsoft\Windows Photo Viewer\
Note 1: The image file in above path will be named Windows Photo Viewer Wallpaper.jpg and is a copy of the original image used to set the desktop wallpaper. I am unaware of a easy method to trouvez le location of the original image (an file/image duplicate comparison tool might be an option).
Note 2: If desktop background was NOT set by Windows Photo Viewer, the above path might sometimes redirect to %AppData%\Microsoft\Windows instead. This is not unexpected. Dismiss the window, and move on to one of the below scripts to find correct wallpaper location.
Desktop background set by Slideshow or other methods
If the wallpaper is set by Windows Slideshow, 3rd party app or manually set by a user, try one of the below scripts.
The code will attempt to extract the original location of the image by decoding binary data from below key in the Windows Registry.
Key Name: HKEY_CURRENT_USER\Control Panel\Desktop
Value Name: TranscodedImageCache
Windows Slideshow -
Manually set wallpaper - e.g., clic droit on image file et sélectionnez "Set as desktop background"
Script 1 - VBScript
- To decode le registre key and view the image in Explorateur Windows, follow the instructions listed on ElevenForum.com;
(or)
- Open Notepad to save below code in a
.vbs file and run it.
Only ASCII compatible.
Read the warning written below the code for more information.
The contents of .vbs file - [5]
`Const HKCU = &H80000001 'HKEY_CURRENT_USER
sComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\" _
& sComputer & "\root\default:StdRegProv")
sKeyPath = "Panneau de configuration\Desktop\"
sValueName = "TranscodedImageCache"
oReg.GetBinaryValue HKCU, sKeyPath, sValueName, sValue
sContents = ""
For i = 24 To UBound(sValue)
vByte = sValue(i)
If vByte <> 0 And vByte <> "" Then
sContents = sContents & Chr(vByte)
End If
Next
CreateObject("Wscript.Shell").Run "explorer.exe /select,""" & sContents & """"
**Note**: The vbs didn't work for me when I first set up the Slideshow, but it worked *after* changing to the next image in the Slideshow.
**Warning**: This vbs code does not work if the file name contains non-ASCII characters, i.e., if [Unicode](https://en.wikipedia.org/wiki/Unicode#Scripts_covered) characters (like Δ, Й, ק ,م, ๗, あ, 叶, 葉, 말) are present in the file name, then the vbs code above will fail to locate the image in Windows Explorer.
Script 2 - PowerShell [[8]](https://gist.github.com/winhelponline/4dc635770d5b123f6c1a719326037880)
ASCII + Unicode compatible
-
Option A:
Run below code in a [PowerShell](https://en.wikipedia.org/wiki/PowerShell) window.
- Open/select **Windows PowerShell** using the Start menu or Win + X shortcut.
(Admin) privilege is not required.
- Paste below code and press Enter.
`$TIC=(Get-ItemProperty 'HKCU:\Control Panel\Desktop' TranscodedImageCache -ErrorAction Stop).TranscodedImageCache`
- Paste below code (a second time) and press Enter.
`[System.Text.Encoding]::Unicode.GetString($TIC) -replace '(.+)([A-Z]:[0-9a-zA-Z\\])+','$2'`
Location of the wallpaper will displayed.
-
Option B:
Save below code as `.ps1` file and run
- Open ***Notepad*** and paste the three lines of code mentioned below.
- Save the new document as `Wallpaper_path.ps1` file.
Note: Under 'Save as type:' option, select "**All types**" (see screenshot below).
- Go to the file, right click on the file and select "Run with PowerShell"
Location of the wallpaper will be generated and *copied to clipboard*.
`$TIC = (Get-ItemProperty 'HKCU:\Control Panel\Desktop' TranscodedImageCache -ErrorAction Stop).TranscodedImageCache
$result = [System.Text.Encoding]::Unicode.GetString($TIC) -replace '(.+)([A-Z]:[0-9a-zA-Z\\])+','$2'
Set-Clipboard -Value $result
Save .ps1 file -
Run .ps1 file -
Script 3 - AutoHotkey
ASCII + Unicode compatible
Download and install AutoHotkey.
Open Notepad and save below code as .ahk file.
Run .ahk file.
Appuyez sur Win + W and the location of the wallpaper will be displayed in a message box.
`#Requires AutoHotkey v2.0
#SingleInstance force
; #HotIf WinActive("ahk_class WorkerW ahk_exe explorer.exe")
; commented out - enable shortcut on desktop only
#W::{ ; Win + W
MsgBox "WallpaperPath_v5`n" WallpaperPath_v5(ThisHotkey),, 262144 ; 262144 = Always-on-top
}
; #HotIf
;