Article ID: 254957 - Last Review: November 21, 2006 - Revision: 3.1 BUG: Registry update code may fail when an unprivileged user runs an MFC OLE server on Windows 2000
This article was previously published under Q254957 IMPORTANT: This article contains information about modifying the registry. Before you
modify the registry, make sure to back it up and make sure that you understand how to restore
the registry if a problem occurs. For information about how to back up, restore, and edit the
registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986
(http://support.microsoft.com/kb/256986/EN-US/
)
Description of the Microsoft Windows Registry
On This PageSYMPTOMS
When an unprivileged (for example, a non-administrator or a non-power) user runs a standard Microsoft Foundation Classes (MFC) OLE server on Windows 2000,
the registry update fails and displays the following error message:
"Failed to update the system registry. Please try using REGEDIT."
CAUSE
This error occurs because each time an MFC OLE executable server runs, it calls the UpdateRegistry function in the COleTemplateServer class.
The MFC UpdateRegistry function updates the registry entries in HKEY_CLASSES_ROOT for both the application and its document types. This update
either creates the entries when the program is executed for the first time, or updates the entries to repair any damage that may have occurred. In Windows
2000, access to HKEY_CLASSES_ROOT is restricted to administrators and power users.
RESOLUTIONWARNING: If you use Registry Editor incorrectly, you may cause serious problems that may
require you to reinstall your operating system. Microsoft cannot guarantee that you can solve
problems that result from using Registry Editor incorrectly. Use Registry Editor at your own
risk. To resolve the error and allow the server to register when it is executed by a privileged user, test the registry permissions when you open a key, as demonstrated in the following code: STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. MORE INFORMATION
Windows 2000 by default is a secure Windows environment. In this environment, unprivileged users may write to the following three specific locations:
Steps to Reproduce the Behavior
REFERENCES
Application Specifications for Microsoft Windows 2000 for Desktop Applications (Specifications\Platforms). Application Specifications for Microsoft Windows 2000 for Distributed Applications (Specifications\Platforms). Microsoft Windows 2000 Application Compatibility (Technical Articles\Windows Platform\Windows 2000). Microsoft Windows 2000 Group Policy (Backgrounders\Windows Platform\Windows 2000) APPLIES TO
| Other Resources Other Support Sites
CommunityArticle Translations |






















Back to the top