Ok, problem solved. My collegue Jolyon told me to override procedure TComObjectFactory.UpdateRegistry(Register: Boolean); to solve the problem. ;-)
Regards Leigh www.smootharm.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Dave O'Brien Sent: Friday, 26 January 2007 1:45 p.m. To: NZ Borland Developers Group - Delphi List Subject: RE: [DUG] comobject Can you check to see if the key exists with reg.openkeyreadonly before writing? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Leigh Wanstead Sent: Friday, 26 January 2007 1:16 p.m. To: NZ Borland Developers Group - Delphi List Subject: [DUG] comobject Hello everyone, Here is the sequence for a Delphi 7 comserver startup to call CreateRegKey. procedure TApplication.Initialize; procedure InitComServer; procedure TComServer.Initialize; procedure TComServer.UpdateRegistry(Register: Boolean); procedure TComClassManager.ForEachFactory(ComServer: TComServerObject; FactoryProc: TFactoryProc); procedure TComServer.FactoryUpdateRegistry(Factory: TComObjectFactory); procedure TTypedComObjectFactory.UpdateRegistry(Register: Boolean); procedure TComObjectFactory.UpdateRegistry(Register: Boolean); procedure CreateRegKey(const Key, ValueName, Value: string; RootKey: DWord = HKEY_CLASSES_ROOT); I can understand that the delphi application needs to update registry. But there is no such need every time to update. It can be updated only once, after that there is no such need. The question is if the user who launch my application does not create regristry rights, what to do? I don't want user to have admin rights just to start my application. TIA Regards Leigh _______________________________________________ Delphi mailing list Delphi@ns3.123.co.nz http://ns3.123.co.nz/mailman/listinfo/delphi _______________________________________________ Delphi mailing list Delphi@ns3.123.co.nz http://ns3.123.co.nz/mailman/listinfo/delphi _______________________________________________ Delphi mailing list Delphi@ns3.123.co.nz http://ns3.123.co.nz/mailman/listinfo/delphi