Replace the Lock Screen image with your own

BKPB

Member
RU
Есть ли возможность изменить изображение экрана блокировки на своё ?
EN
Is there a way to replace the lock screen image with your own ?
 
This works on all editions, except for Home (which doesn't follow any GPO rules):

1. From Post-Setup (Before logon), Add / File your image file.
Change Type from Background to Copy
Change the Destination path to your preferred folder location.​

1721843022614.png

2. Update this reg file with the correct filename, and import from the Registry page.
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP]
"LockScreenImageStatus"=dword:00000001
"LockScreenImagePath"="C:\\Image\\03356_haystacksunset_1920x1080.jpg"
"LockScreenImageUrl"="C:\\Image\\03356_haystacksunset_1920x1080.jpg"



Windows 11 x64-2024-07-24-12-28-39.png
 
RU
Спасибо за Ваш работу и потраченное время. Работает !!!
EN
Thank you for your work and time spent. It's working !!!
 
Tell me, is it normal that the Setup folder with the lock screen image is not automatically deleted from the Windows folder after the installation is completed and the computer is restarted ? C:\\Windows\\Setup\\img107.jpg"
 
NTLite will copy files Added to Post-Setup under C:\Windows\Setup\Files or FilesU folders, and remove them. Any files copied to other locations using the Destination parameter will not be deleted.

The reg file is only an example, the Lock Screen image can be in any folder.
 
I edited my SetupComplete.cmd incorrectly. After saving the edited image, another SetupComplete.cmd was formed. I took the code from it and inserted it into my SetupComplete.cmd and did not notice that at the end of the newly created SetupComplete.cmd there is a del /q /f "%0" command and now my script is not working correctly. Tell me how I can combine them.

Or you can register in your SetupComplete the launch of the NTLite SetupComplete created by the program by renaming it.

I'm thinking of writing in my SetupComplete.cmd the launch of NTLite_SetupComplete.cmd and then everything will probably work correctly.
 

Attachments

Last edited:
1. SetupComplete.cmd always runs as SYSTEM. You don't need to run any checks for Admin rights.
Code:
fltmc >nul || exit /b

2. You should never CD into different folders, before running commands with a relative path. Always use the absolute path, or the %WINDIR% variable so you know exactly where every folder or file lives.
https://www.elevenforum.com/t/enable-or-disable-onedrive-in-windows-11.2318/post-288791

3. This SetupComplete has a lot of programming errors, mostly from poor typing. If you're not sure, it's better to borrow someone else's script example until you understand how evrything works.

Anything that runs from SetupComplete can be manually tested by running from an Admin CMD window.
 
The situation is like this, I use my SetupComplete.cmd to install Windows.
Now after editing .wim of the image, when saving it,
the NTLite program created its own SetupComplete.cmd.
It turned out that now I have two SetupComplete.cmd,
and I can't put them in the same folder because they have the same name.
I do not know how to combine them so that they work correctly.
The problem is that SetupComplete.cmd from NTLite is written to delete the del /q /f script itself "%0".
That's why I asked for your help.

@echo off
fltmc >nul || exit /b
call "%~dp0MAS_AIO.cmd" /KMS38
cd \
(goto) 2>nul & (if "%~dp0"=="%SystemRoot%\Setup\Scripts\" rd /s /q "%~dp0")

@ECHO OFF
CD "%TEMP%"&CLS&@TITLE
powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Files\Change_My_Profile.ps1"
regedit /S "%WINDIR%\Setup\Files\Lock_Screen_Image.reg"
powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Files\Post_Delete_Apps.ps1"
rd /q /s "%WINDIR%\Setup\Files"
del /q /f "%0"
 
1. SetupComplete.cmd always runs as SYSTEM. You don't need to run any checks for Admin rights.
Code:
fltmc >nul || exit /b

2. You should never CD into different folders, before running commands with a relative path. Always use the absolute path, or the %WINDIR% variable so you know exactly where every folder or file lives.
https://www.elevenforum.com/t/enable-or-disable-onedrive-in-windows-11.2318/post-288791

3. This SetupComplete has a lot of programming errors, mostly from poor typing. If you're not sure, it's better to borrow someone else's script example until you understand how evrything works.

Anything that runs from SetupComplete can be manually tested by running from an Admin CMD window.
These are not errors, this is a description of the command in Russian in 866 encoding, so that you can know which command performs what.
 
I can recognize non-English encoding. You wrote:
Code:
:: Óäàëÿåì OneDrive
taskkill /im OneDriveSetup.exe >Nul 2>&1
tskill /a OneDriveSetup >Nul 2>&1

tskill instead of taskkill. During Windows install, there is no RDP session so you wouldn't use tskill.
 
I copied this code from another post, probably there was such an error in it. Thank you for pointing this out to me.
 
@echo off
fltmc > nul || exit /b
вызовите "%~dp0MAS_AIO.cmd" /KMS38
cd \
(goto) 2> nul & (если "%~ dp0" =="%SystemRoot%\Setup\Scripts\" rd /s /q "%~ dp0")

@ECHO OFF
CD "%TEMP%"&CLS&@TITLE
powershell -NoProfile -Неинтерактивный обход политики выполнения -файл "%WINDIR%\Setup\Files\Change_My_Profile.ps1"
regedit /S "%WINDIR%\Setup\Files\Lock_Screen_Image.reg"
powershell -NoProfile -Неинтерактивный обход политики выполнения -файл "%WINDIR%\Setup\Files\ Post_Delete_Apps.ps1"
rd /q /s "%WINDIR%\Setup\Files"
del /q /f "%0"
Is it possible to combine these two scripts so that activation occurs first, then a script is executed to replace the Lock Screen image that was created by the NTLite program ?
 
Don't mix and match random SetupComplete scripts. You can take someone else's removal script, and have NTLite run their batch or PS file from Post-Setup, and then you don't need to combine them.
 
Back
Top