@echo off
CLS
color 1f
for /f "tokens=4-5 delims=. " %%i in ('ver') do set "TestWinVer=%%i"
IF %TestWinVer% LSS 10 echo This script only works on Windows 10 Kernels. & GOTO :Finished

TITLE Checking for Admin...
echo.
cd %systemroot%\system32
call :IsAdmin


TITLE Fix Win+L LockScreen to use Picture {Wallpaper}.
cls
echo.
echo Setting Registry to fix Win+L LockScreen to use Picture {Wallpaper}.
 REG add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "RotatingLockScreenEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
 REG add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "RotatingLockScreenOverlayEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
 REG add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "RotatingLockScreenOverlayVisible" /t REG_DWORD /d "1" /f >NUL 2>&1
 REG add "HKLM\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "RotatingLockScreenEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
 REG add "HKLM\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "RotatingLockScreenOverlayEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
 REG add "HKLM\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "RotatingLockScreenOverlayVisible" /t REG_DWORD /d "1" /f >NUL 2>&1
echo.
echo Done. No reboot needed.

:Finished
echo.
pause

exit

=====================================================================================
:IsAdmin
Reg.exe query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
 Cls & echo. & Echo You must have administrator rights to continue ... & echo.
 Pause & Exit
)
Cls

exit /b
