SOLVED

Editing Lockscreen with Script via Registry

Brass Contributor

Hey there,

 

does somebody know the Registry-Path to edit the Lockscreen-Picture?

I want to automate it, so Powershell is the best way i guess.

 

Greetings

Yannik Schulz

8 Replies
best response confirmed by Schulzi (Brass Contributor)
Solution

Hi @Schulzi 

 

You will need to create a Registry Value in key HKLM\Software\Policies\Microsoft\Windows\Personalization called LockScreenImage with a value of pointing to the file you want to use for lockscreen

 

regedit.png

 

You can also do this via Group Policy Computer Configuration > Policies > Administrative Templates > Control Panel > Personalization > “Force a specific default lock screen image”

@HidMov 

 

did not worked for me...

If I edit the Registy-Entry, nothing happens-it wont change the Lockscreen Picture to the specified value.

 

Maybe I did something wrong?

Had to create the Registry-Key but normally that shouldn't be a problem.

And is it possible to create a Lockscreen-Diashow on the same way as well??

 

Greetings 

Yannik Schulz

 

Hi @Schulzi 

 

Aside from the usual cavets with the machine being able to see the shared folder where the image resides, I'm not too sure what might have gone wrong. Does it work if you try it from the GPO, and if so is the reg key the same?

Hi @HidMov 

 

no, it does not work in GP aswell...

Path of the Picture is accessible for every User on the PC...(C:\install\Useful\Lockscreen.jpg)

I also tried putting it in "C:\Windows\Web\Screen" didn't work either

 

Greetings Schulzi

Hi @Schulzi 

 

Sorry to hear you are having issues still. I've just spun up a test Win10 machine and manually added in the key and a downloaded a .jpg and it's set up the lockscreen to the picture after a gpupdate

 

lockscreen1.png

 

The reg key is as shown:

 

lockscreen2.png

 

The only thing I can recommend is to have a look through the event logs and see if there is any mention of the GPO being unable to apply and if it has an error. Have you also tried a different picture format/resolution/bit depth?

Hi @HidMov 

 

so far I tried 2 or 3 different Images on 3 Different Ways:

Way 1: The Regkey:

Schulzi_1-1601376734640.png

Should be the right path...

 

Way 2: GPO

Schulzi_2-1601376861465.png

(in english: "Force a specific Lockscreenimage)

 

Way 3: Set it manually 

Schulzi_3-1601377035566.png

(double click Image -> Settings -> Set As -> LockScreen)

    => That is the only way to get that image...

 

 

In the Eventlogs I got 3 Warnings and 2 Errors regarding Group Policies...

But these Errors potentially come from my try to Update the GP via CMD (Run CMD as Admin -> gpupdate /force), because I'm currently on an Admin Account, where Group Policies often fail to update...

 

If you got anymore Questions, feel free to ask

 

 

Greetings 

Yannik Schulz

Hi @HidMov 

 

apparently it is an Error on my PC I used to write the scripts.

Yesterday I set-up another PC and it worked there.

 

Thanks for your help.

 

 

Greetings

Yannik Schulz

Hi @HidMov 

 

me again.

So now that I know how that works, can I create a Slideshow on the same way aswell?

 

After that, I think we should have everything for the Lockscreen via Registry for everybody that is looking editing Lockscreen via Registry

 

PS: The best for everyone to read is probably to get all in one post and mark it as "Best Response"

 

Greetings

Yannik Schulz 

1 best response

Accepted Solutions
best response confirmed by Schulzi (Brass Contributor)
Solution

Hi @Schulzi 

 

You will need to create a Registry Value in key HKLM\Software\Policies\Microsoft\Windows\Personalization called LockScreenImage with a value of pointing to the file you want to use for lockscreen

 

regedit.png

 

You can also do this via Group Policy Computer Configuration > Policies > Administrative Templates > Control Panel > Personalization > “Force a specific default lock screen image”

View solution in original post