How to programmatically force Windows 10 OS to read again registry values and apply them during existing user session?

Michal Zyzak 31 Reputation points
2020-08-05T13:33:09.433+00:00

Hello

We are setting up a rather unusual Win10-based thin client device. There are 3 requirements (out of many) that create a problem for us:

  • User must be able to logon also without network connected.
  • User profile must be deleted on logoff
  • User must be able to personalize his environment (display scaling, mouse cursor speed, keyboard layout etc.) and that personalization must be retained.

What we are trying to do is to export user registry settings (from HKCU/Control Panel/) on logoff and import them on logon.
Problem is that those changes in registry are not applied on session that is already started.

Question:
How to programmatically force Windows 10 OS to read again registry values and apply them during existing user session?

Notes:

  1. We have custom shell running and restart of explorer.exe is not an option. Restarting custom shell is not helping.
  2. We tried broadcasting a WM_SETTINGCHANGE via SendMessage WIN32 API - no change
  3. We tried RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters ,1 ,True - no change
  4. We are not software developers. Best to have the solution done in PowerShell

Regards
MZ

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

1 answer

Sort by: Most helpful
  1. Anonymous
    2020-08-06T08:49:42.453+00:00

    Hi,

    May I know "without network connected" means without internet or unplugging the network cable?

    It seems there is no PowerShell solution for your requirements. Not sure if there are some third party software can support.

    Thanks,
    Eleven


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.