There's two methods for changing the lock screen backgrounds. The "correct" way changes the settings for each user's account profile and leaves the system defaults alone. The "wrong" way overwrites the shared default background, so every user inherits the same image.
Depending on which method, a customization script may not work in (Before logon) versus (After logon).
(Before logon) runs under the SYSTEM identity, and not as your user account. HKEY_CURRENT_USER doesn't point to you.
(After logon) runs after you've logged on to the desktop. HKEY_CURRENT_USER is you.
If you have to update HKCU, then a script must run during (After logon).