Delphi Error Creating System Registry Entry
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more cannot create key error writing to the registry windows 10 about Stack Overflow the company Business Learn more about hiring developers or posting
Error Writing To Registry Key Hkey_local_machine
ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack
Regsetvalueex Failed Code 5
Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error Creating System Register Entry Error On Win8 up vote 0
Cannot Create Value Error Writing To The Registry Windows 10
down vote favorite 1 On Windows 8, the following raises error. CoInitializeEx(nil, COINIT_APARTMENTTHREADED or COINIT_SPEED_OVER_MEMORY); // or simply CoInitialize(nil); gives the same error However, if application runs as 'Administrator', it is working fine. On Windows 7, there is no such problem. The application is built using Delphi XE3, (32-bit). Any solution to get rid of this? First chance exception at $76AA4B32. Exception class EOleRegistrationError with message 'Error creating system cannot create key you do not have the requisite permissions registry entry'. Process RPM.exe (4584) delphi share|improve this question edited Jun 29 '13 at 18:48 asked Jun 29 '13 at 18:42 SteakOverCooked 1,5281232 What is the error? –David Heffernan Jun 29 '13 at 18:44 It would be extremely helpful if you told us what the error was it raised. I can't quite read your screen from where I'm sitting. –Ken White Jun 29 '13 at 18:45 1 Note that COINIT_SPEED_OVER_MEMORY does nothing at all: blogs.msdn.com/b/oldnewthing/archive/2012/11/08/10366704.aspx –David Heffernan Jun 29 '13 at 18:45 re-edited. It also raises exception if i use CoInitialize(nil); –SteakOverCooked Jun 29 '13 at 18:47 add a comment| 1 Answer 1 active oldest votes up vote 4 down vote accepted The error that you report in the question is not thrown by a call to CoInitialize. The error that you report is a Delphi exception and CoInitialize is a Windows API call. A call to CoInitialize will not raise a Delphi exception. The EOleRegistrationError is thrown by TComObjectFactory.UpdateRegistry. And that method is called when you are attempting to register (or unregister) a COM server. Which is something that requires administrator rights because it involves modifications to HKLM. So, it would seem that the call to CoInitialize
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about cannot edit error writing the value's new contents hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Cannot Create Key: Error Writing to the Windows 7 Registry up vote 1 down vote favorite http://stackoverflow.com/questions/17383565/error-creating-system-register-entry-error-on-win8 I have Windows 7 Ultimate 64 bit. Things were going well until I had to install Outlook 2007 and Visio 2007 on my machine for some client work. After that Microsoft Office 2007 started trying to reconfigure itself every time i was launched. After some uninstalls, registry cleaning, re-installs, and various other experimental changes I was able to correct the "Configure" issue [for all programs except Visio and I'm willing to accept that]. However, during the process I lost http://superuser.com/questions/185323/cannot-create-key-error-writing-to-the-windows-7-registry the ability to do "File-->New-->Word Document" and "File--> New-->Excel Document", etc.. I tried repairing Office, but that did not add the menu items back in. After some searching it appears this issue can be fixed by adding registry keys, as described here. Unfortunately I am unable to add those registry keys. The reg files from the link give an error: "Error Accessing Registry". I opened up RegEdit and try to add the keys manually, I get get the error "Cannot Create Key: Error Writing to the Registry." I have also tried some programs such as Creative Elements Power Tools and FileTypesMan to address this issue, but neither one was able to solve it. I didn't get any errors from those tools, but it did not add items back into the "new" menu. For the most part my experiments have been with trying to get excel in the file new menu, but long term I want to get them all back there. I am running regedit as an administrator. I have re-assigned ownership of the key in question to the administrator group. I have also given the Administrator group. my login account, the system account, and the everyone account full access to "HKEY_CLASSES_ROOT.xlsx" key [and the "HKEY_CLASSES_ROOT" key). That had no affect. I also tried to use subinacl.exe to give access to those registry keys, but that did not address the issue. I'm assuming I did so
does not even understand their requirement for COM Server registration and then translating that to code has been described in the most kiddish format in my other blog message. I doubt Borland will have the courage to admit http://do-the-right-things.blogspot.com/2006/11/fixing-up-borland-delphis-com-server.html mistake and fix their problem as this problem exists in their product unchanged since http://www.willneumann.net/2008/09/configuring-bde-for-windows7/ Delphi 3 to the latest, including those not yet released product. Hence it is a dead loss trying to get Borland to do something. I am going to show you how to fix this problem. It is as easy as learning "Mary has a little lamb" rhyme. Before I'll show you the fix, let me reproduce their documentation error writing partially here: Start mode Switch Meaning smAutomation embedding The application was started by Windows in response to a request from an automation controller. smRegServer regserver The application was started only to add the server to the system registry. smStandalone The user started the application as a stand-alone, interactive application. smUnregServer unregserver The application was started only to remove the server from the system registry.Table 1 - Permissible COM Server switches For running error writing to the automation server as a stand alone application, you do not include any switch. From the above requirement, it seems pretty obvious that you only have to run through the COM registration manipulation code when you encounter the switches /regserver or /unregserver. Incidentally this is the standard stuff if you build the COM local server using VB6, MFC and ATL. Now it is time to reveal how Borland handles this situation badly. To see this you can locate this code fragment in ComServ.pas at around line 373, if you have access to Borland's Delphi tool or simply search for TComServer.Initialize in Unit ComServ. It is reproduced here in Listing 1,// Listing 1procedure TComServer.Initialize;begintry UpdateRegistry(FStartMode <> smUnregServer);except on E: EOleRegistrationError do // User may not have write access to the registry. // Squelch the exception unless we were explicitly told to register. if FStartMode = smRegServer then raise;end;if FStartMode in [smRegServer, smUnregServer] then Halt;ComClassManager.ForEachFactory(Self, FactoryRegisterClassObject);end; In merely 9 lines (ignoring comments), the two bold red lines are erroneous and I am going to show you why. Let's take the bug number 1 and that is the COM Server registration code (the first line in red).If you assign the values listed in column 1 in table 1 to the variable FStartMode, one value at a ti
Paradox Databases, Windows 7 Windows 7 can be very restrictive towards applications written for the previous versions of Windows. This is the case with the Borland Database Engine (BDE), which is not capable of running in Windows7 unless two settings have been changed: A permission for the BDE must be given in the windows registry database. A BDE attribute named "Net Dir" must be configured to an arbitrary folder other than the root drive (C:). This configuration is done in the "BDE Administrator" program that's installed with the BDEInfoSetup utility. 1. First, configure the permission for the BDE in the registry… Make sure you are logged into your Windows7 machine with an administrator account. Then follow these directions: Go to Start | Run… Type regedit… Open the HKEY_LOCAL_MACHINE branch. Open the SOFTWARE branch. Right-Click on the entry labeled "Borland". In the menu that shows select Permissions. The following dialog will appear: Click "Users". Under "Permissions for Users ", select "Allow" for Full Control. Then click OK. Click OK to exit the Registry Key Permissions dialog box. Exit the Registry Editor window 2. Next the Borland Database Engine must be configured… The Borland Database Engine makes use of a special file called "Pdoxusrs.net" (the purpose of which is beyond the scope of this document). The default setting for the placement of this file is in the root of drive C, which will fail under Windows Windows7, as this operating system does not permit new files to be created here. However, it is permitted to designate any subfolder for the "Pdoxusrs.net" file to be placed. The name of this new folder is of minor importance and could be named anything you like. For example, here we will choose "BDEShare". (The name doesn't matter. It just needs to be any folder other than the root drive.) So let's stick with this example. Create a subfolder off the root drive C and name it "BDEShare". So the file path for this new subfolder will be "C:BDEShare". Remember this string value because you will need to enter it below. Now the BDE must be configured to use the new folder. This is done in the Windows control panel, where you will find an applet named "BDE administrator". Note that you will only see this after the BDE has been installed to your sys