 | | From: | dk_sz | | Subject: | Problems registering type library | | Date: | Fri, 17 Dec 2004 14:18:07 +0100 |
|
|
 | I have .exe file that contains a COM server (which works). I have .tlb file in same directory.
I let InnoSetup install these 2 files and register .tlb as type library. (as I've seen elsewhere on the net.) This does not seem to work :-|
I know the COM Server is registered first time .exe runs (tested and this works), but I would like install program to do this.
My next attempt will be to have InnoSeup register the .exe file as type library (since AFAIK the .exe file contains the type library as well); however, this idea contradicts what I've seen in examples on the net?
Any other reasons/suggestions/ideas why this doesn't work for me?
best regards Thomas Schulz
|
|
 | | From: | dk_sz | | Subject: | Re: Problems registering type library | | Date: | Fri, 17 Dec 2004 14:53:23 +0100 |
|
|
 | >I have .exe file that contains a COM server (which works). > I have .tlb file in same directory.
Basicly my question is:
Source: My.exe; DestDir: {app}; Components: HoloMsgs; Flags: ; Source: My.tlb; DestDir: {app}; Components: HoloMsgs; Flags: ;
Which of above should have flags: regtypelib regserver ?
best regards Thomas
|
|
 | | From: | dk_sz | | Subject: | Re: Problems registering type library | | Date: | Fri, 17 Dec 2004 15:36:17 +0100 |
|
|
 | > Which of above should have flags: > regtypelib > regserver > ?
Should perhaps be said that I am currently starting and using my .exe COM server through variants (late binding)... So that's what I've been testing with as well.
best regards Thomas Schulz
|
|
 | | From: | Fernando | | Subject: | Re: Problems registering type library | | Date: | Fri, 17 Dec 2004 14:59:05 +0000 (UTC) |
|
|
 | dk_sz wrote:
>> Which of above should have flags: >> regtypelib >> regserver >> ? > > Should perhaps be said that I am currently starting and using > my .exe COM server through variants (late binding)... > So that's what I've been testing with as well. > > best regards > Thomas Schulz
Hi, I use the following solution:
[Files] Source: C:\path-al-archivo\archivo.exe; DestDir: {app}; Flags: ....
[Run] Filename: {app}\archivo.exe; Parameters: /regserver; Flags: runhidden
[UninstallRun] Filename: {app}\archivo.exe; Parameters: /unregserver; Flags: runhidden
If you need the COM server unregistered prior to installation:
[Files] .... Source: C:\path-al-archivo\archivo.exe; DestDir: {app}; Flags: ....; BeforeInstall: MyUnregServerExe({app}\archivo.exe)
[Code]
procedure MyUnregServerExe(arch: String); var registracion: Boolean; RetCode: Integer; detail: String;
begin registracion := InstExec(arch, '/unregserver', '', True, True, 0, RetCode); if registracion = True then Log('Desregistración exitosa: ' + arch) else begin detail := SysErrorMessage(RetCode) Log('Desregistración fallida: ' + arch + ' Error: ' + detail) end; end;
Hope it helps. Regards,
Fernando
|
|
 | | From: | dk_sz | | Subject: | Re: Problems registering type library | | Date: | Sat, 18 Dec 2004 14:32:25 +0100 |
|
|
 | > [Run] > Filename: {app}\archivo.exe; Parameters: /regserver; Flags: runhidden > > [UninstallRun] > Filename: {app}\archivo.exe; Parameters: /unregserver; Flags: runhidden
Thanks Fernando
After doing a bit of (re)reading and slapping myself in the face (doh!), your solution works perfectly. I do not know why, but I was not aware one "out-of-box" could use /regserver /unregserver params! :-)
best regards Thomas
|
|
 | | From: | dk_sz | | Subject: | Re: Problems registering type library | | Date: | Fri, 17 Dec 2004 17:06:52 +0100 |
|
|
 | > Hi, I use the following solution:
Hi Fernando!
Thanks for your help. I did also try: " [Files] Source: my.exe; DestDir: {app}; Flags: regtypelib regserver " which didn't work. I think I will use your solution instead!
Is there any other way to have InnoSetup uninstall the COM Server? (but at install simply launching the .exe app in hidden mode)
best regards Thomas Schulz
|
|