Windows Spotlight brings some amazing wallpapers for the Lock Screen, which you can save and use as your desktop background. By now, I’m pretty sure most users know how to view and store the lock screen images collection from the Assets folder.
Then I made a post on how to find the exact file name of the current lock screen wallpaper image in use, using the Registry Editor or a script to find the image file and save it to your Pictures folder automatically.
Along those lines, here is another interesting Windows Spotlight tip which I thought of sharing here.
Windows 10 doesn’t notify you when it downloads lock screen images from the server. And the wallpaper change frequency is also unknown. You’ll get to see the new wallpaper only when you lock the workstation, or when accessing the Personalize – Lock Screen Settings page where you can see a real-time preview of the current lock screen image.
Besides that, you can get notified when a new spotlight image lands up in the Assets folder, using a couple of third-party utilities.
Use NewFileGo to watch the Assets folder for new wallpapers
NewFileGo from “joe joe soft” is a helpful tool that watches files/folders for changes and triggers a program or command.
With NewFileGo, you can:
- Watch multiple folders
- Monitor specific file extensions in a folder, using file mask
- Execute Explorer context menu commands
- Execute programs, Scripts, Batch files
- Pass the new/changed file name as a parameter to the program or script that’s triggered.
Start NewFileGo and click Add new Watcher.
In the Edit Action dialog, select “New Files” from the dropdown. Type the following Assets folder path.
Under “Command to Execute”, select Run for each file (recommended)
In the text box below, type the following command-line:
rundll32.exe "C:\Program Files\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen %s
Note: You can mention the path for a different image viewer (e.g., IrfanView) and then followed by %s. %s represents the filename (with full path) which we’re passing as an argument to the trigger program or script. Don’t include quotes around the parameter if you’re using Windows Photo Viewer to preview the file.
Click Save. When a new file arrives in the Assets folder, NewFileGo will launch Windows Photo Viewer to display the new wallpaper image.
But there is a little inconvenience here. The Assets folder is used not only for storing lock screen images, but also pictures of smaller dimensions – such as live tile images which you don’t want to preview.
A 154x154px image that appeared in the Assets folder.
There is no file size filtering option in NewFileGo. But you can set NewFileGo to trigger a custom script that validates the image (based on file size) and then launches the previewer.
Triggering a custom script that starts the previewer
Here is a script I wrote which checks the image file size. If the size is more than 300KB, it’s highly likely that the file is a lock screen image. In that case, the script launches Windows Photo Viewer to preview the file.
'Preview the image file using Windows Photo Viewer 'Meant to use with NewFileGo to watch for new Lock Screen images 'Created by Ramesh on Nov 02, 2016 'https://www.winhelponline.com/blog/new-spotlight-wallpaper-notify-windows-10-lock-screen/ If wscript.arguments.count = 0 Then Wscript.quit Set WshShell = WScript.CreateObject("WScript.Shell") Set objFSO = WScript.CreateObject("Scripting.Filesystemobject") sNewLSIFile = Replace (wscript.arguments(0), """", "") If objFSO.FileExists(sNewLSIFile) Then Set objFile = objFSO.GetFile(sNewLSIFile) 'Preview the image only if it's bigger than 300KB If objFile.size < 307200 Then WScript.Quit sMsg = "You've got a new Lock Screen (Windows Spotlight) image. Want to preview it?" rtn = MsgBox (sMsg, vbYesNo + vbInformation, "New Lock Screen Wallpaper!") If rtn = vbYes Then sRunCmd = "rundll32.exe " & """" & _ "C:\Program Files\Windows Photo Viewer\PhotoViewer.dll" & """" sRunCmd = sRunCmd & ", ImageView_Fullscreen " & sNewLSIFile WshShell.run sRunCmd End If End if
Copy the above contents to Notepad and save the file with the
.vbs extension, let’s say
lock_screen_image_watch.vbs. Then in the “Edit Action” dialog in NewFileGo, mention the script file name instead of Windows Photo Viewer path. The complete command you’d use is as follows:
wscript.exe "d:\scripts\lock_screen_image_watch.vbs" %s
When a new wallpaper arrives, the script is triggered and you’ll see the following message box.
Click Yes to preview the image using Windows Photo Viewer.
Windows might download around 4-5 images at a stretch and so you’ll see multiple message boxes as below.
NewFileGo has an option to pass multiple file names as parameters to the trigger script. That’s something you can test it out (and modify the script accordingly) if you don’t want to see multiple message boxes or multiple instances of Windows Photo Viewer opening on the screen.
NewFileGo consumes less than 5 MB of memory with folder watch enabled.
Use FolderChangesView to watch the Assets folder for new wallpapers
FolderChangesView (from Nirsoft) monitors the folder or disk drive that you choose and lists every filename that is being modified, created, or deleted while the folder is being monitored. You can set the utility to play a .wav file when a file is created, changed or deleted.
Launch FolderChangesView and type the Assets folder path in the “Choose Folder” dialog box that appears.
Then configure it such that a .wav file is played when changes occur in the above folder.
FolderChangesView can only list the new/modified files and play a wave file. It doesn’t support launching a program or custom script when a change occurs in that folder, and there is no option to monitor only “New” files. This utility consumes approximately 3.5 MB of memory even when folder monitoring is turned on.
Using a WMI Script to Monitor the Assets folder
You don’t need a program to monitor a single folder. You can create or use a VBScript to monitor the Assets folder using Windows Management Instrumentation (WMI).
WMI folder monitoring scripts poll the target folder at specified intervals for changes, and this might take a toll on the system performance if the interval is set too low.
Whereas the above programs use API to get notified when folder contents change — and then trigger the program, script or .wav file. For folder watcher script examples using WMI, check out this Technet forums page, and CodeProject site.
One small request: If you liked this post, please share this?One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!