|
One other possibility:
Apart from storing in the SAM, maybe for other purposes, the problem might be that the process that maintains the driver database and does this validation (System, perhaps) has its own internal variable for this flag. When you manually update the registry, the internal variable on the process is not updated, only on reboot.
Check the documentation for WM_WININICHANGE or WM_SETTINGCHANGE. For the latter:
The system sends the WM_SETTINGCHANGE message to all top-level windows when the SystemParametersInfo function changes a system-wide setting or when policy settings have changed.
The control panel applet might using WM_SETTINGCHANGE to notify the driver database process that it should reload this configuration value. Either that, or it directly invokes some of its API's, and it's that process itself that updates both the in-memory flag and the registry value.
|