Hi Leigh,
yes, we had this exact problem (with D6 tho) and we had to basically go
into the VCL and edit the code ourselves. It was suggested online by
someone (can't remember who), but we basically edited ComServ.pas,
editing the TComServer.Intialize as follows:
procedure TComServer.Initialize;
begin
try
UpdateRegistry(FStartMode <> smUnregServer);
except
on EOleSysError do
if FStartMode = smRegServer then raise;
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;
Hope this helps,
Cheers,
Phil.
Leigh Wanstead wrote:
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
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi
begin:vcard
fn:Phil Middlemiss
n:Middlemiss;Phil
org:Vision Software, MTS Ltd
email;internet:[EMAIL PROTECTED]
title:Project Leader
tel;work:+64 7 3480001
tel;cell:+64 27 4592648
x-mozilla-html:TRUE
url:http://www.tumonz.co.nz
version:2.1
end:vcard
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi