cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Randy40
Level 4

Self-registerable files

Hi, this is probably the dumb question of the day, but here goes: I have several DLL and OCX files that are self-registerable, and have set the Self-Register Property in the IDE Setup to Yes for all self-registerable DLL and OCX files under this particular Component. Is it also necessary for me to run something like LaunchAppAndWait (WINSYSDIR ^ "regsvr32.exe", + , WAIT) in the InstallScript of this project, or is that redundant? I understand that certain factors could cause the self-register process to fail during install (e.g. file(s) in use), but aside from that this is what I need to know. Many thanks.

Regards,

Randy
Labels (1)
0 Kudos
(5) Replies
Christopher_Pai
Level 16

It's redundant. If you know that DllRegisterServer() calls increase installer fragility, why are you using it? Is there really a reason why you can't right click | Extract COM the keyfile of the component or use COM Extract at Build?

I fought the concept of "COM Extraction Is Best Practice" for about the first 12 months I wrote Installs. Eventually I came to be a believer and I hope you will also.
0 Kudos
RobertDickau
Flexera Alumni

If you're using an InstallScript project, though, those don't have COM extraction. Chris is quite right, though, that you don't need to double-register your self-registering files.
0 Kudos
Christopher_Pai
Level 16

First, I apologize if I assumed incorrectly that you are using an MSI project.

Second, hmmm, I wonder.... Why not use MSI-style DLL registration in InstallScript projects?

I once wrote a `fake` installer for an Airline Terminal Emulator ( Attachmate WRQ/InfoConnect now owned by TCB also ). The requirement was that all applications had to be applied isolated to the user profile when an airline loggen in and when the user logged off, it had to be back to the exact same pristine state.

This was accomplished by running the application off of the network and applying all COM/Registry to the HKCU hive with only a couple HKLM\SOFTWARE\Attachmate keys. All user documents were to the profile and when the user logged off, it was all backed out so that when another airline logged in it wouldn't conflict with their product.

But what does this have to do with SelfReg? Imagine running a registry snapshot/diff tool to come up with a Reg file for do/undo instead of calling regsvr32 for 100+ DLL's. The perfomance difference is amazing and it's more reliable.

So maybe a neat feature for InstallScript would be a lighter weight COM registration pattern.
0 Kudos
Randy40
Level 4

Hi, first of all, thanks to both of you for your prompt and helpful replies. And my apologies, I should have specified that this is an InstallScript-based project. But I like the idea of having a reg file for undo/do, instead of multiple calls on regsvr32! Thanks again, very much appreciate your replies. Cheers.

Randy
0 Kudos
brianthegood
Level 6

How do I know whether the dll I want registered is self-registering or not?
If it isn't, should I go ahead and use regsvr32 in my installscript? I didn't quite understand what to do otherwise.
If the dll is self registering, other than installing the dll, is there something else I need to do?

Thanks!

B
0 Kudos