I believe there's two registry keys that organisations can enforce on their domain's computers, where the user is unable to change the lock screen image in Windows 10 and the image is set to a predefined one - each of these events is a key respectively.
Anyway, the way the predefined image is set is by placing it in the C:\Program Files\images\
directory. Usually the default is 1.jpg
in there; but it may change due to an event. National Recycling Week happened and that's what spurred me to create this automated application to automate the process I'd been already doing manually. The National Recycling Week lock screen image was put in C:\Program Files\images\
too, and its name was 7.jpg
.
See the Compatible Filetypes table in the Using section to see what we support.
I've made this project Open Source / Source-avaliable on GitHub here in case anyone else is interested or they suffer a similar limitation from their IT team.
The program asks you for two things: The old lock screen image (In my case, 1.jpg
or 7.jpg
); and the filename of the image to replace the lock screen with.
It then creates a Batch script because I'm more comfortable with Batch for filesystem interactions. (Java I find better for everything else!) It runs the Batch file afterwards, and does all of the file replacing. Wonderful! The lock screen should stay in the new state until a domain policy update and/or a system drain.
No dependencies. (Except Java!)
- Clone the project:
GitHub CLI:
gh repo clone Toydotgame/LockScreenChanger
Git:
git clone https://github.com/Toydotgame/LockScreenChanger
- Navigate to the project directory:
cd LockScreenChanger
- Run
GUI.java
using Java:
java src/GUI.java
From the Releases Tab
- Download the latest
.jar
file. - Move the file to the location of a
.jpg
file you'd like to set as your lock screen. (In the same folder) - Run the
.jar
. - Enter the file information:
a) The name of the new background you want. (Make sure it's a.jpg
file!)
b) The JPEG filename of the image inC:\Program Files\images\
. (In my school's case:1.jpg
or7.jpg
.)
Name | Extension |
---|---|
PNG | .png |
JPEG | .jpg , .jpeg or .jfif |
Bitmap | .bmp |
TIFF | .tif or .tiff |
- It says
Command Prompt has been disabled by your administrator...
after I press Apply!- See issue #2.
- I get a "Windows cannot find "run.bat"." error.
- This means you've put the JARfile in an admin-protected folder. Move it to one that is not. (e.g: Don't put it in
C:\Program Files\
,C:\Windows\
, orC:\ProgramData\
) - This problem is addressed in issue #1.
- This means you've put the JARfile in an admin-protected folder. Move it to one that is not. (e.g: Don't put it in
If you have a different problem; please open a new issue in the Issues tab.
- Command-line launch arguments
- Either with:
- A seperate version without a GUI which does it straight away; or
- The current version accepting flags and then running without the GUI and automatically proceeding
- Either with:
- Replace Windows Batch Script with in-built Java file operations.
- This is due to some computers having very broken Command Prompts on our network. Hopefully, reducing dependence on Windows and moving everything to my Java application should make it more future-proof.