Windows 10: Impostazione e aggiornamento dell’immagine per la schermata di blocco tramite GPO

Per impostare l’immagine della schermata di blocco è possibile utilizzare la gpo Computer Configuration\Administrative Templates\Control Panel\Personalization\Force a specific default lock screen image (si noti comunque che tale policy è applicabile solo alle SKU Enterprise, Educational e Server).

Purtroppo in diverse versioni di Windows 10 quando l’immagine che si è impostata per la schermata di blocco viene modificata questa modifica non viene riflessa sulla schermata di blocco a meno che non si forzi l’applicazione della policy o non venga modificato il nome dell’immagine e conseguentemente modificata la policy.

A riguardo è possibile trovare varie discussioni, si vedano ad esempio:

Da cui si può è possibile notare come l’issue relativo all’aggiornamento dell’immagine sia presente nelle versioni 1607, 1703 di Windows 10. Nella versione 1803 si verifica invece un issue differente per cui l’immagine della schermata di blocco non viene visualizzata fino a che l’utente non esegue il login a riguardo si veda la discussione Windows 10 1803 – Custom Login/Lock Screen Image Is Not Applied Until a User Logs In.

A riguardo si veda anche il post Known Lock Screen issues with Creator’s Update (1703) in cui viene specificato che se è attiva anche la GPO Computer Configuration\Administrative Templates\Control Panel\Personalization\Prevent changing lock screen and logon image l’immagine non viene aggiornata:

“The first is with the Group Policy setting “Force a specific default lock screen image” under Computer Configuration\Administrative Templates\Control Panel\Personalization

In many cases trying to enabled, change or update this doesn’t appear to work for new or existing users in the environment.

This will happen if “Prevent changing lock screen and logon image” policy is also enabled.

One of the key indicators of this is when you see the desired lock screen image in Settings under Lock screen as the preview but the controls to change are greyed out.”

Sempre nel post Known Lock Screen issues with Creator’s Update (1703) viene indicato che con l’aggiornamento KB4020102 questo issue è stato corretto:

“This issue is fixed in beta builds and an update released last week in May KB4020102.

The workaround is to set “Prevent” to Disabled or Not Configured, apply that change and then make the desired updates to “Force”. If there are still issues with Force at this point, test applying it in an OU that blocks inheritance for all other polices to confirm there isn’t something else in play.

The “Force” policy does work by default, with no other policies enabled.”

Per risolvere l’issue è stato implementato un nuovo algoritmo per la cache delle immagini per la per la schermata di blocco, anche se l’applicazione dell’aggiornamento KB4020102 potrebbe causare ancora dei malfunzionamenti:

“The fix for the first issue implemented new image cache and algorithm. Initially, when “Prevent…” was applied it would block any changes made to “Force…” policy. After the May update this has changed and may have some side effects. Some reports I’m seeing are:

  • This is not reproducible 100% of the time.
  • Some machines will work and some will not with the same settings.
  • Resetting the policies to Not Configured and reenabling does not resolve the behavior
  • Some users report this issue without any Group Policies, users not able to change it via Settings
  • Changing the location of the lock screen image on the system may work
  • Lock screen reverts/changes to Cave after resolution change
  • Lock screen behavior is inconsistent when Docked vs Undocked

These symptoms are not all a result of the May update and are not necessarily all the same issue but one issue that we are working on is with the new image cache implementation. The workaround for this issue is:

  • Copy the image you want to a second path and update the policy with the new path.
  • Update the Last Modify Timestamp of the image referenced in the policy.
  • Backup and delete the folder C:\ProgramData\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly\LockScreen_P”

La cache delle immagini della schermata di blocco si trova nella directory C:\ProgramData\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly sotto la cartella LockScreen_P, tale cartella è protetta quindi per esaminarne il contenuto è possibile ad esempi schedulare uno script con l’account SYSTEM che esegue il comando DIR, di seguito un esempio di output:

Directory di C:\ProgramData\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly\LockScreen_P

29/04/2019 09:08 <DIR> .
29/04/2019 09:08 <DIR> ..
13/02/2019 18:27 379.464 LockScreen.jpg
13/02/2019 18:27 16.534 LockScreen___0108_0108.jpg
13/02/2019 18:27 27.357 LockScreen___0151_0151.jpg
13/02/2019 18:27 37.100 LockScreen___0194_0194.jpg
13/02/2019 18:27 379.464 LockScreen___1366_0768_notdimmed.jpg
29/04/2019 09:08 693.163 LockScreen___1920_1080_notdimmed.jpg
6 File 1.533.082 byte
2 Directory 457.909.092.352 byte disponibili

Sempre nella directory C:\ProgramData\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly esiste una seconda cartella ovvero la LockScreen_Z con il seguente contenuto:

28/08/2018 08:08 <DIR> .
28/08/2018 08:08 <DIR> ..
27/08/2018 16:01 123.110 LockScreen___1024_0768_notdimmed.jpg
28/08/2018 08:08 163.361 LockScreen___1366_0768_notdimmed.jpg
31/03/2017 10:25 242.717 LockScreen___1680_1050_notdimmed.jpg
3 File 529.188 byte
2 Directory 457.909.092.352 byte disponibili

Concludendo se si sta utilizzando una versione di Windows 10 per cui non esiste un aggiornamento che risolve il problema del mancato aggiornamento dell’immagine per la schermata di blocco la soluzione più pratica, se tale immagine non cambia con estrema frequenza, è quella di creare file immagini nuovi e modificare la GPO impostando il nuovo file.