0

I'm trying to set up Lock Screen for Users. I've created a new Registry Key with the three values:

my registry key

I'm using %userprofile% since I don't know all the name of users. But the Lock Screen is not changing only if I use

C:\user\pictures\Lock Screen\img.jpg

Is not possible to use %userprofile% in a Registry String Value or is there an other way?

Thank you in advance.

3
  • Where in the registry is your key? Why can't you put the image in a folder accessible by all?
    – harrymc
    Commented Feb 10, 2023 at 15:23
  • The lock screen is not inside any user (on the lock screen you can select the user to login) so which user do you think it should expend to? Commented Feb 10, 2023 at 15:28
  • The lock screen image needs to be accessible by System, since no user is logged in. The default path for this registry key/policy setting is C:\windows\web\screen\lockscreen.jpg
    – Cpt.Whale
    Commented Feb 10, 2023 at 15:52

1 Answer 1

1

It sounds to me like a combination of two things.

  1. In order for the registry to expand the environment variables like %userprofile% or %public% you need to use the REG_EXPAND_SZ value type (choose Expendable String Value when creating the value) instead of the standard REG_SZ (String Value) you have used

  2. You're trying to use a user environment variable (%userprofile%) in the context of the lock screen which is before logging in to any user. So which user is it supposed to use? You can only use system environment variables (like %public% or %root% there.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .