Skip to content

Instantly share code, notes, and snippets.

@eliashussary
Created February 16, 2018 15:35
Show Gist options
  • Save eliashussary/7f87d1e2b1a9b7ea0bc5fcdeee6cfccc to your computer and use it in GitHub Desktop.
Save eliashussary/7f87d1e2b1a9b7ea0bc5fcdeee6cfccc to your computer and use it in GitHub Desktop.

Revisions

  1. eliashussary created this gist Feb 16, 2018.
    12 changes: 12 additions & 0 deletions change-wallpaper.bat
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    echo off

    :: Handle CLI Args
    IF [%1]==[] (
    echo No wallpaper path provided, please provide a full qualified path. Ex: C:\dir1\dir2\wallpaper.jpg
    exit /b 1
    )

    :: Commands
    echo Changing wallpaper to: %1
    reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d %1 /f
    RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters