GPO - Lockscreen image not updating when being changed on network drive

OBrien9703 1 Reputation point
2025-03-29T01:21:00.2366667+00:00

Hello,

I am posting this message as I am having an issue to update a lockscreen background image for my computer clients.

Let me explain…

I created a GPO from this section on my server :

Computer Configuration > Administrative Templates > Control Panel > Personalization.

Enable the "Force a specific default lock screen and logon image"

I have set an UNC path for the lockscreen picture.

Everything works fine as my computer clients are able to display the lockscreen image.

However, I would like that lockscreen image to change every week and therefore, I have set a script updating the picture inside the UNC path automatically using a Scheduled Task (file name is always the same for better convenience).

The issue I have is that my computer clients never take the new picture set automatically in the UNC path.

Is there any additional thing to do ?

Thanks in advance.

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Marten Theunissen 676 Reputation points
    2025-03-29T02:16:27.7366667+00:00

    Good day,

    Having a static name might not get seen as a change that occurred. Cycle through 2 alternate names as an idea.

    Change the Image Path: Sometimes, simply changing the image file path can help. Rename the image file and update the GPO with the new path. This forces the system to recognize the change.

    Permissions: Ensure that the network drive and the image file have the correct permissions set so that all users can access the image.

    0 comments No comments

  2. Anonymous
    2025-03-31T03:52:40.67+00:00

    Hello OBrien9703,

    Thank you for posting in Q&A forum.

    Here are the main points and some ways to work around the caching behavior:

    Windows copies the file from your UNC location to a local cache (typically it may be in a system‐protected area). Once this local copy is in place, Windows won’t re-read the file from the UNC location even if its contents change (file name or folder name is the same). Because of this, even though your script successfully overwrites the file on the server, clients continue to use the cached image.

    Please consider one of the following approaches:

    1.Change the File Name (and Policy Setting) with Each Update

    If you update the image file with a new name each week, you force Windows to download the fresh image. In this case you’d need to update the GPO setting so that the policy points to the new file name.

    2.Clear the Local Cache

    Alternatively, you might script the removal of the locally cached version (or the folder containing the lock screen images in the UNC path) on each client machine at the scheduled time. With the cache cleared, the next time the policy is applied, Windows should fetch the image from the UNC path.

    User's image

    Configure the desktop and lock screen backgrounds

    https://learn.microsoft.com/en-us/windows/configuration/background/?tabs=gpo&pivots=windows-11

    3.Force a GPO Refresh

    Running “gpupdate /force” or having clients log off or restart might trigger a check for the image. However, based on behavior observed in many environments, even a GPO refresh will not override the local caching if the file name is identical.

    Nonetheless, if you clear the local cache as mentioned above along with the refresh, this can help ensure the new image is fetched.

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

    Best Regards,

    Daisy Zhou

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

  3. OBrien9703 1 Reputation point
    2025-04-04T09:41:53.56+00:00

    Hello,

    Thank you for your replies and suggestions.

    Daisy Zhou : unfortunately, updating the file name is not an option as my automatic script running from my server will always copy the new lockscreen background file with the same name so that we never have to change the file name inside the GPO.

    As for the local cache on clients, after some research, here is what I could find out :

    In the "C:\Windows\Web" folder, the default Windows 10/11 lockscreen can be found under the name "img100.jpg"

    Also, the current lockscreen seems to be stored in the "LockScreenImagePath" and "LockScreenImageUrl" registry keys at the following paths :

    "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization"

    "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP"

    Indeed, if I perform these actions manually, then I can update my lockscreen when I lock my session :

    1. Change the current "LockScreenImagePath" and "LockScreenImageUrl" registry key values to "C:\Windows\Web\Screen\img100.jpg"
    2. Revert immediately the value to my UNC path
    3. Lock my session to see if change applies

    I've tried to automate this through my existing GPO using this logoff script but to no avail as the lockscreen remains the same :

    reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP" /v "LockScreenImagePath" /t REG_SZ /d "C:\Windows\Web\Screen\img100.jpg" /f
    reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP" /v "LockScreenImageUrl" /t REG_SZ /d "C:\Windows\Web\Screen\img100.jpg" /f
    TIMEOUT /T 5 /NOBREAK
    reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP" /v "LockScreenImagePath" /t REG_SZ /d "\\myserver\lockscreen\lockscreen.jpg" /f
    reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP" /v "LockScreenImageUrl" /t REG_SZ /d "\\myserver\lockscreen\lockscreen.jpg" /f
    reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization" /v "LockScreenImage" /t REG_SZ /d "C:\Windows\Web\Screen\img100.jpg" /f
    TIMEOUT /T 5 /NOBREAK
    reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization" /v "LockScreenImage" /t REG_SZ /d "\\myserver\lockscreen\lockscreen.jpg" /f
    

    Is there anything wrong I do and that could explain the reason why I cannot automate this ?

    Thanks in advance.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.