PRB: RegReplaceKey Fails on Windows 98 If User Profiles Are Enabled

ID: Q214775


The information in this article applies to:


SYMPTOMS

If the RegReplaceKey API is used to replace the registry key of the currently-logged-on user (HKEY_USERS\Username), and user profiles are enabled, the API call fails with a return value of 0x57 (ERROR_INVALID_PARAMETER). The specified registry key is not replaced.


CAUSE

RegReplaceKey does not work on Windows 98 if user profiles are enabled.


RESOLUTION

Microsoft does not recommend using the RegReplaceKey API on Windows 98.

To restore the Windows 98 registry from a backup, Microsoft recommends replacing the registry files (System.dat and User.dat) during the real-mode portion of Windows startup. This method prevents possible registry corruption if another application reads from or writes to the registry while the restore (replace) operation is in progress. This method is used by the Windows 98 Registry Checker utility to restore backed-up copies of the Windows 98 registry.


MORE INFORMATION

Please see the References section for additional information about the RegReplaceKey API.


REFERENCES

For additional information about problems with RegReplaceKey under Windows 98, please see the following article in the Microsoft Knowledge Base:

Q193467 BUG: RegReplaceKey() Fails in Windows 98

Additional query words:


Keywords          : kbSDKWin32 kbWinOS98 kbWinOS98bug 
Version           : winnt:
Platform          : winnt 
Issue type        : kbprb 

Last Reviewed: March 6, 1999