There are two scripts available that may accomplish your goal. One is for Windows 7 and the other is for Windows 8.
For Windows 7:
see:
How to Add "Desktop Background File Location" Option to Desktop Right-Click Menu in Windows 7 - The Winhelponline Blog
Here is the script inline:
'"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
'Copyright © 2010 Ramesh Srinivasan. All rights reserved.
'Filename : WPTargetDir.vbs
'Description : Opens the target folder of current Desktop Background in Windows 7
'Author : Ramesh Srinivasan, Microsoft MVP (Windows)
'Homepage :
The Winhelponline Blog - Windows 7/Vista/XP Tips, Fixes and Troubleshooting
'Created : Feb 02, 2010
'"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Set WshShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
strMsg = "Completed!" & Chr(10) & Chr(10) & "WPTargetDir.vbs - © 2010 Ramesh Srinivasan" & Chr(10) & Chr(10) & "Visit us at
The Winhelponline Blog - Windows 7/Vista/XP Tips, Fixes and Troubleshooting"
strCurWP =""
On Error Resume Next
strCurWP = WshShell.RegRead("HKCU\Software\Microsoft\Internet Explorer\Desktop\General\WallpaperSource")
On Error Goto 0
If Trim(strCurWP) = "" Then
MsgBox "No Wallpaper selected for Desktop Slideshow"
Else
If fso.FileExists(strCurWP) Then
WshShell.run "explorer.exe" & " /select," & strCurWP
Else
MsgBox "Cannot find target for " & strCurWP
End If
End If
'""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
'This script was brought to you by "The Winhelponline Blog"
'Visit us at
The Winhelponline Blog - Windows 7/Vista/XP Tips, Fixes and Troubleshooting
'""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
rename it to something .vbs (such as t.vbs) and double click on it. Then to add a menu item use:
start->search->regedit.exe
and create a key called WallPaperPic under HKEY_CLASSES_ROOT/DesktopBackground/Shell
and a key called Command under the WallPaperPic key
and add this as the value:
cmd /C "START /WAIT CScript C:\Windows\t.vbs"
(Note that when I ran "Add.reg" as shown in the link it did not work, which is why I created the WallPaperPic registry key by hand.)
For Windows 8 the process is similar, but you will need a different script which can be found here:
How to Determine the Current Wallpaper File Name and Path in Windows 8 - The Winhelponline Blog
and here is the script inline:
' Copyright © 2013 Dwight Grant. All rights reserved.
' Filename: Win8_WP_Curr_Image_Name-Folder.txt
' Version: 2.00.01
'
' Purpose: If (in Windows 8) running Desktop Wallpaper Slideshow:
' To Display the Name of the Current Image (opt=1)
' or
' Display the Folder with the Current Image Selected (opt=2).
'
' This script reads and decodes registry key:
' HKEY_CURRENT_USER\Control Panel\Desktop\TranscodedImageCache
' and displays results on desktop
'
' How to Use - Creation:
' 1. Save Text file at a location of your choosing.
' 2. Open Text file with "Notepad" and "Save As" same name with ".vbs" file type.
' You will now have both "Win8_WP_Curr_Image_Name-Folder.txt" and
' "Win8_WP_Curr_Image_Name-Folder.vbs".
' 3. Create desktop shortcut to "Win8_WP_Curr_Image_Name-Folder.vbs".
'
' Operation: Double Click on the Desktop Icon Created,
' Executes "Microsoft Windows Based Script Host" and
' will display full path name of Wallpaper file.
'
'*** Author: Dwight Grant **** Revised: Nov. 27, 2013 ***
' based upon idea from Ramesh Srinivasan in program "WPTargetDir.vbs" for Win 7
' & revisions suggested by FleetCommand.
'
' *** Please note: It is not unicode compliant - Path name needs to be ASCII to display properly.
' If anyone has sugestions as to how to make it compliant, please explain, and I will try to
' incorporate it into the next version.
' **********************************************************
Set Shell = CreateObject("WScript.Shell")
strEr1 = "Error "
strSingle = " "
strSelect = " /select,"
strExplor = " "
opt = 2 '1= Display File Name Only - 2=Display Folder w/ File Name Selected
strPath = "" 'Path Name w/ leading blanks removed
sQ1 = """" 'A QUOTE mark
Results = " "
On Error Resume Next
arr = Shell.RegRead("HKCU\Control Panel\Desktop\TranscodedImageCache")
If Err.Number <> 0 Then
strEr1 = strEr1 & CStr(Err.Number) 'Set error display string
msgbox strEr1,,"Win8 WP Curr Image Name" 'display error
WScript.Quit
End If
On Error Goto 0
a = arr
For I = LBound(arr) To Ubound(arr) 'Pull data from "arr" and convert to integer
a(I) = Cint(arr(I)) 'Store integer in array "a"
if I > 23 then 'Disregard the first 23 characters
strSingle = Chr(a(I)) 'Move byte in array "a" to "strSingle”
if a(I) > 0 then 'If byte > zero, use it, else ignore
strPath = strPath & strSingle 'Add character to string for display
end if
end if
Next
' **********************************************************
if opt = 1 then
msgbox strPath,,"The Wallpaper File Name is" 'Display results on desktop screen
end if
if opt = 2 then
Results = sQ1 & strPath & sQ1
strExplor = strSelect & Results
'msgbox strExplor,,"The String Passed to Explorer is" 'Diagnostic Display
return = Shell.run("explorer.exe" & strExplor,,true)
end if
' **********************************************************
Wscript.Quit
This page was helpful for creating right-click shortcuts to run the scripts by right-clicking on the background wallpaper:
Creating Shortcut Menu Handlers (Windows)