Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Find the current lock screen (Windows Spotlight) wallpaper file name (for v1709 & earlier)
'Finds current lock screen wallpaper file, copies it to Pictures folder and previews it.
'Ramesh Srinivasan,
'Created on 1 Sep, '16
'For Windows 10 v1709 and earlier
Dim WshShell: Set WshShell = Createobject("Wscript.Shell")
Dim objFSO: Set objFSO = Createobject("Scripting.Filesystemobject")
On error resume next
sCurrLSI = WshShell.RegRead ("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative\LandscapeAssetPath")
On error goto 0
sDstFL = WshShell.ExpandEnvironmentStrings( "%USERPROFILE%" )
sDstFL = sDstFl & "\Pictures\" & objFSO.GetFileName(sCurrLSI) & ".jpg"
if objFSO.FileExists(sCurrLSI) then
objFSO.copyfile sCurrLSI, sDstFL
WshShell.Run sDstFL
Msgbox "Lock Screen image file doesn't exist in the specified location."
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment