'************************************** ' Name: Windows 10 Desktop Wallpaper Cha ' nger ' Description:Very Basic Script to chang ' e the Desktop Wallpaper on Windows 10. J ' ust Drag & Drop an Image on the Script a ' nd that's it. ' By: A_X_O ' ' ' Inputs:None ' ' Returns:None ' 'Assumes:None ' 'Side Effects:None '************************************** ' '--------------------------------------- ' ---------------------------------------- ' '+++++++++++++++++++++++++++++++++++++++ ' ++++++++++++++++++++++++++++++++++++++++ ' ' Demonstration: Windows 10, Desktop Im ' age Changer ' '+++++++++++++++++++++++++++++++++++++++ ' ++++++++++++++++++++++++++++++++++++++++ ' ' ' ' Purpose : Demonstrates Drag and Drop; ' Registry Writing ' ' -------------------------------------- ' --------------------------------- ' ' Creation Date : 01/04/2019 [dd/mm/yyyy ' ] ' ' Version : 1:1 ' ' Designer : Fabian ' ' ' '####################################### ' ######################################## ' ' MODIFICATION HISTORY ' '--------------------------------------- ' ---------------------------------------- ' ' ' ' Version : 1:0 01/04/2019 Create the S ' ample ' ' : 1:1 02/04/2019 Added Automatic Ref ' resh ' ' ' '--------------------------------------- ' ---------------------------------------- ' ' Public Const HKCU = &H80000001 Public Const RegKey = "HKCU\Control Panel\Desktop\Wallpaper" Public Const RunDLLpath = "\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters" Public Const IntPause = 1000 ' Dim WshShell Dim FSO Dim SystemPath ' Dim Args Dim Arg ' Dim DeskImage Dim NewDesktopImage ' Public Const ExecutionError = "Drag & Drop any image on this VBScript" Public Const ExecutionTitle = "Execution Error" ' Set WshShell = Wscript.CreateObject("Wscript.Shell") Set FSO = CreateObject("Scripting.FileSystemObject") ' SystemPath = FSO.GetSpecialFolder(1) ' Set Args = WScript.Arguments ' If Args.Count < 1 Then ' Msgbox ExecutionError, VbSystemModal + VbExclamation + VbOkOnly, ExecutionTitle ' Else ' For Each Arg In Args ' Set DeskImage = FSO.GetFile(Arg) ' NewDesktopImage = DeskImage.ShortPath ' Next ' With WshShell ' .RegWrite RegKey, "%" ' WScript.Sleep IntPause ' .RegWrite RegKey, NewDesktopImage ' .Run SystemPath & RunDLLpath,1, True ' WScript.Sleep IntPause ' .SendKeys "%{F5}", True ' End With ' End If ' Set WshShell = Nothing Set FSO = Nothing