Created
November 4, 2020 08:42
-
-
Save winhelponline/c669fe6b9b2ba13a980888e22fb0e398 to your computer and use it in GitHub Desktop.
Find the current lock screen (Windows Spotlight) wallpaper file name (for v1709 & earlier)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Finds current lock screen wallpaper file, copies it to Pictures folder and previews it. | |
'Ramesh Srinivasan, Winhelponline.com | |
'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 | |
else | |
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