Desktop Background Slideshow is a neat little feature in Windows 7 which helps you shuffle your desktop background from a image file store folder, at predefined intervals. But, as Windows doesn’t show the file name of the currently displayed wallpaper, it becomes a problem if you have thousands of images in a store folder and you need to find the file name and the directory location of the currently displayed wallpaper.

Here is a small script which adds the Desktop Background File Location option in the Desktop context menu, which opens the current wallpaper file’s target folder and selects the file.

1. Download WPTargetDir.zip, unzip and extract the contents to a folder.

2. Move the file WPTargetDir.vbs to the Windows directory.

3. Double-click Add.reg to add the context menu option.

4. Hold the SHIFT key down and right-click on an empty area in the Desktop. You’ll see the Desktop Background File Location option.

Selecting this option gets the current wallpaper file name from the registry, opens the target folder and selects the image file.

To remove/uninstall this option, run the file undo.reg, and then manually delete WPTargetDir.vbs manually from the Windows folder.

More Information

The script queries the wallpaper source file name from the following registry key:

HKEY_CURRENT_USER \ Software \ Microsoft \ Internet Explorer \ Desktop \ General

The information is stored in a string value named WallpaperSource


Related Posts


Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

22 Comments

  1. Raghav
    said this on Saturday, January 15th 2011 5:04 pm

    This is great. Nifty tool, Ramesh!

  2. Rick G
    said this on Saturday, August 21st 2010 5:57 am

    This Rox! Thanks!
    =>Rick G

  3. Mike
    said this on Tuesday, May 4th 2010 7:17 am

    Thank you for this script :) It came in very handy.

  4. Dan
    said this on Friday, April 23rd 2010 6:07 am

    Great script – just what I was looking for!

    There was a problem with the folder “天使的眼淚 – 嘉” from W7 personalization gallery though. Guess it’s the foreign characters.

  5. said this on Monday, March 29th 2010 8:58 pm

    @Matevž: You’re right technically. However, the “explorer /select …” command-line works just fine without quotes.

    Tried something like:

    explorer /select, D:\Backup\Img\Tours 2008\2539260_n.jpg
    And it works just fine.

  6. Matevž
    said this on Monday, March 29th 2010 8:44 pm

    Your script is errorneous if wallpaper filename contains spaces! The 22nd line should look like:

    WshShell.run “explorer.exe” & ” /select, “”" & strCurWP & “”"”

  7. said this on Sunday, February 14th 2010 1:29 pm

    UPDATE: I ran regedit as administrator and used the “import” feature to import the reg file. It’s working like a charm now.

    Thanks for sharing this great tweak.

  8. said this on Sunday, February 14th 2010 1:23 pm

    Ramesh, yes please…and even better, share it with everyone. :) Thanks..

    I’m somewhat disappointed that I’m the only one raising this concern….

    Just goes to show you how “insecure” most Windows users are…

  9. anon
    said this on Sunday, February 14th 2010 12:29 pm

    This particular tweak is incredibly useful. Thanks Ramesh your blog is very helpful. I love your reg/scripted tweaks.

  10. said this on Tuesday, February 9th 2010 1:14 pm

    @Scott: With a little change in the .REG file, you can make it work for limited users as well. Replace HKCR paths with HKCU\Software\Classes, save the file and merge it. And the path to the script file is to be changed as well. I can send one to your mail id if you need it.

Leave a Reply