Find the current wallpaper image path in Windows

Andy

Well-known member
Creative Team
User ID
1
Joined
7 Jan 2019
Messages
1,315
Reaction score
87
Points
48
Got a new computer with a nice stock wallpaper and wondered where is that wallpaper stored?

Open a new notepad, paste the .vbs code below:
Code:
Const HKCU = &H80000001 'HKEY_CURRENT_USER

sComputer = "."   

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
            & sComputer & "\root\default:StdRegProv")

sKeyPath = "Control Panel\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 & """"

Save as GetWallpaperSource.vbs (make sure that you save it without .txt, by default notepad saves as .txt)

Otherwise, you can also download the attached .vbs

Thanks for reading and I hope this article have been useful. Cheers.
 

Attachments

 Short URL:
Back
Top