Created
December 4, 2021 11:12
-
-
Save est/c465d6b35cdac704bcbfc590a55e239e to your computer and use it in GitHub Desktop.
set win10 locksreen wallpaper to users
This file contains hidden or 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
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