Skip to content

Instantly share code, notes, and snippets.

@est
Created December 4, 2021 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save est/c465d6b35cdac704bcbfc590a55e239e to your computer and use it in GitHub Desktop.
Save est/c465d6b35cdac704bcbfc590a55e239e to your computer and use it in GitHub Desktop.
set win10 locksreen wallpaper to users
for /f %%g in ('wmic useraccount where name^="%USERNAME%" get sid ^| findstr ^S\-d*') do set USERSID=%%g
For /f "tokens=3" %%k IN ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Creative\%USERSID% /s /v landscapeImage /t REG_SZ ^| findstr /ri "REG_SZ"') do set img_path=%%k
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d %img_path% /f
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment