chrisjj

New Member
Joined
Sep 20, 2012
Messages
56
Can anyone point me to documentation of the effect wherein HKCU registry
keys showing to regedt32 and apps change when the user's account type is changed?

A user of account type Standard installed an app which created some config
keys, and regedt32 showed these keys fine, under HKEY_CURRENT_USER\Software\ .
But they are invisible when the account is changed to account type
Administrator, and reappear when it is changed back to Standard.

Even odder is that when the app runs from the user as Standard, the key
values it receive appear to be those from the Administrator version. This
caused a nasty data loss bug in the apps output, so I'd like to understand
the cause.

Thanks.
 


Last edited:
Solution
The issue you are experiencing with HKCU registry keys behaving differently based on the user's account type is likely due to how Windows handles user-specific registry entries. Here's an explanation of what might be happening:
  • HKEY_CURRENT_USER (HKCU): This hive in the Windows Registry holds all user-specific settings and configurations. When a user logs in, Windows creates a separate HKCU subkey for that user.
  • Account Type Changes: When you switch between different account types (Standard User and Administrator), the user-specific HKCU registry settings also change accordingly. This is because each user account has its own set of registry settings.
  • Visibility of Keys: When you switch from a Standard User...
The issue you are experiencing with HKCU registry keys behaving differently based on the user's account type is likely due to how Windows handles user-specific registry entries. Here's an explanation of what might be happening:
  • HKEY_CURRENT_USER (HKCU): This hive in the Windows Registry holds all user-specific settings and configurations. When a user logs in, Windows creates a separate HKCU subkey for that user.
  • Account Type Changes: When you switch between different account types (Standard User and Administrator), the user-specific HKCU registry settings also change accordingly. This is because each user account has its own set of registry settings.
  • Visibility of Keys: When you switch from a Standard User account to an Administrator account, the registry settings associated with the Standard User account may not be visible in regedt32 because you are now looking at the registry settings of the Administrator account.
  • App Behavior: The behavior where an app running under a Standard User account is somehow interacting with values from the Administrator account's registry settings could be due to how the app is accessing and reading the registry.
  • Data Loss Bug: The discrepancy in registry settings being read by the app based on the user's account type is likely the root cause of the data loss bug you mentioned. To address this issue and prevent data loss, you may consider the following steps:
    1. App Code Review: Review the application's code to ensure that it is correctly reading the registry settings based on the user account that is running the application.
    2. Registry Key Permissions: Check the permissions on the registry keys created by the app to ensure that the appropriate users (Standard User and Administrator) have the necessary read and write access.
    3. User Environment Variables: Ensure that the app is using the correct environment variables to access user-specific registry settings, especially in scenarios involving user account type changes. Understanding how user-specific registry settings work in Windows can help you diagnose and fix the issue with the app's behavior. If you need further assistance or detailed steps on resolving this issue, feel free to provide additional details or ask specific questions.
 


Solution
Back
Top