SOLVED

Editing Lockscreen with Script via Registry

%3CLINGO-SUB%20id%3D%22lingo-sub-1652851%22%20slang%3D%22en-US%22%3EEditing%20Lockscreen%20with%20Script%20via%20Registry%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1652851%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20there%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Edoes%20somebody%20know%20the%20Registry-Path%20to%20edit%20the%20Lockscreen-Picture%3F%3C%2FP%3E%3CP%3EI%20want%20to%20automate%20it%2C%20so%20Powershell%20is%20the%20best%20way%20i%20guess.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGreetings%3C%2FP%3E%3CP%3EYannik%20Schulz%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1652851%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ERegistry%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1654882%22%20slang%3D%22en-US%22%3ERe%3A%20Editing%20Lockscreen%20with%20Script%20via%20Registry%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1654882%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F784168%22%20target%3D%22_blank%22%3E%40Schulzi%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20will%20need%20to%20create%20a%20Registry%20Value%20in%20key%26nbsp%3BHKLM%5CSoftware%5CPolicies%5CMicrosoft%5CWindows%5CPersonalization%20called%20LockScreenImage%20with%20a%20value%20of%20pointing%20to%20the%20file%20you%20want%20to%20use%20for%20lockscreen%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22regedit.png%22%20style%3D%22width%3A%20619px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F217616i962473DAF1E07AA0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22regedit.png%22%20alt%3D%22regedit.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20also%20do%20this%20via%20Group%20Policy%26nbsp%3BComputer%20Configuration%20%26gt%3B%20Policies%20%26gt%3B%20Administrative%20Templates%20%26gt%3B%20Control%20Panel%20%26gt%3B%20Personalization%20%26gt%3B%26nbsp%3B%E2%80%9CForce%20a%20specific%20default%20lock%20screen%20image%E2%80%9D%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1700861%22%20slang%3D%22en-US%22%3ERe%3A%20Editing%20Lockscreen%20with%20Script%20via%20Registry%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1700861%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F383653%22%20target%3D%22_blank%22%3E%40HidMov%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Edid%20not%20worked%20for%20me...%3C%2FP%3E%3CP%3EIf%20I%20edit%20the%20Registy-Entry%2C%20nothing%20happens-it%20wont%20change%20the%20Lockscreen%20Picture%20to%20the%20specified%20value.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMaybe%20I%20did%20something%20wrong%3F%3C%2FP%3E%3CP%3EHad%20to%20create%20the%20Registry-Key%20but%20normally%20that%20shouldn't%20be%20a%20problem.%3C%2FP%3E%3CP%3EAnd%20is%20it%20possible%20to%20create%20a%20Lockscreen-Diashow%20on%20the%20same%20way%20as%20well%3F%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGreetings%26nbsp%3B%3C%2FP%3E%3CP%3EYannik%20Schulz%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1700890%22%20slang%3D%22en-US%22%3ERe%3A%20Editing%20Lockscreen%20with%20Script%20via%20Registry%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1700890%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F784168%22%20target%3D%22_blank%22%3E%40Schulzi%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAside%20from%20the%20usual%20cavets%20with%20the%20machine%20being%20able%20to%20see%20the%20shared%20folder%20where%20the%20image%20resides%2C%20I'm%20not%20too%20sure%20what%20might%20have%20gone%20wrong.%20Does%20it%20work%20if%20you%20try%20it%20from%20the%20GPO%2C%20and%20if%20so%20is%20the%20reg%20key%20the%20same%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1719149%22%20slang%3D%22en-US%22%3ERe%3A%20Editing%20Lockscreen%20with%20Script%20via%20Registry%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1719149%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F383653%22%20target%3D%22_blank%22%3E%40HidMov%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eno%2C%20it%20does%20not%20work%20in%20GP%20aswell...%3C%2FP%3E%3CP%3EPath%20of%20the%20Picture%20is%20accessible%20for%20every%20User%20on%20the%20PC...(C%3A%5Cinstall%5CUseful%5CLockscreen.jpg)%3C%2FP%3E%3CP%3EI%20also%20tried%20putting%20it%20in%20%22C%3A%5CWindows%5CWeb%5CScreen%22%20didn't%20work%20either%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGreetings%20Schulzi%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1722051%22%20slang%3D%22en-US%22%3ERe%3A%20Editing%20Lockscreen%20with%20Script%20via%20Registry%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1722051%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F784168%22%20target%3D%22_blank%22%3E%40Schulzi%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESorry%20to%20hear%20you%20are%20having%20issues%20still.%20I've%20just%20spun%20up%20a%20test%20Win10%20machine%20and%20manually%20added%20in%20the%20key%20and%20a%20downloaded%20a%20.jpg%20and%20it's%20set%20up%20the%20lockscreen%20to%20the%20picture%20after%20a%20gpupdate%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lockscreen1.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F222650iD299ACB0494CAB38%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22lockscreen1.png%22%20alt%3D%22lockscreen1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20reg%20key%20is%20as%20shown%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lockscreen2.png%22%20style%3D%22width%3A%20614px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F222651i0B5555CA78961345%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22lockscreen2.png%22%20alt%3D%22lockscreen2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20only%20thing%20I%20can%20recommend%20is%20to%20have%20a%20look%20through%20the%20event%20logs%20and%20see%20if%20there%20is%20any%20mention%20of%20the%20GPO%20being%20unable%20to%20apply%20and%20if%20it%20has%20an%20error.%20Have%20you%20also%20tried%20a%20different%20picture%20format%2Fresolution%2Fbit%20depth%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1723852%22%20slang%3D%22en-US%22%3ERe%3A%20Editing%20Lockscreen%20with%20Script%20via%20Registry%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1723852%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F383653%22%20target%3D%22_blank%22%3E%40HidMov%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eso%20far%20I%20tried%202%20or%203%20different%20Images%20on%203%20Different%20Ways%3A%3C%2FP%3E%3CP%3EWay%201%3A%20The%20Regkey%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Schulzi_1-1601376734640.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F222776i415ED42D5A451F8B%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Schulzi_1-1601376734640.png%22%20alt%3D%22Schulzi_1-1601376734640.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EShould%20be%20the%20right%20path...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWay%202%3A%20GPO%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Schulzi_2-1601376861465.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F222777iD4565D0D5525B4C8%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Schulzi_2-1601376861465.png%22%20alt%3D%22Schulzi_2-1601376861465.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E(in%20english%3A%20%22Force%20a%20specific%20Lockscreenimage)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWay%203%3A%20Set%20it%20manually%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Schulzi_3-1601377035566.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F222779i8E96E5DB4B1E374D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Schulzi_3-1601377035566.png%22%20alt%3D%22Schulzi_3-1601377035566.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E(double%20click%20Image%20-%26gt%3B%20Settings%20-%26gt%3B%20Set%20As%20-%26gt%3B%20LockScreen)%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%3D%26gt%3B%20That%20is%20the%20only%20way%20to%20get%20that%20image...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20Eventlogs%20I%20got%203%20Warnings%20and%202%20Errors%20regarding%20Group%20Policies...%3C%2FP%3E%3CP%3EBut%20these%20Errors%20potentially%20come%20from%20my%20try%20to%20Update%20the%20GP%20via%20CMD%20(Run%20CMD%20as%20Admin%20-%26gt%3B%20gpupdate%20%2Fforce)%2C%20because%20I'm%20currently%20on%20an%20Admin%20Account%2C%20where%20Group%20Policies%20often%20fail%20to%20update...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20got%20anymore%20Questions%2C%20feel%20free%20to%20ask%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGreetings%26nbsp%3B%3C%2FP%3E%3CP%3EYannik%20Schulz%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1742099%22%20slang%3D%22en-US%22%3ERe%3A%20Editing%20Lockscreen%20with%20Script%20via%20Registry%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1742099%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F383653%22%20target%3D%22_blank%22%3E%40HidMov%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eapparently%20it%20is%20an%20Error%20on%20my%20PC%20I%20used%20to%20write%20the%20scripts.%3C%2FP%3E%3CP%3EYesterday%20I%20set-up%20another%20PC%20and%20it%20worked%20there.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGreetings%3C%2FP%3E%3CP%3EYannik%20Schulz%3C%2FP%3E%3C%2FLINGO-BODY%3E
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 (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