PDA

View Full Version : Self-Registering does not work



Wincor
02-02-2005, 12:12 PM
Hi,

I have several components with self-registering dlls. The component is marked as "Self-Registering". However, it seems that the files are not registered at all. As far as I know, the self-registering process is called automatically after the files are copied (and after the OnMoved event).

Any ideas what´s going wrong?

Thanks
Wincor

GooSkinBaldi
02-02-2005, 01:03 PM
Have you verified that the DllRegisterServer function has been exported from the DLL? Can you successfully run regsvr32.exe on the DLL?

LewisQ
02-02-2005, 01:16 PM
Hi,

I have several components with self-registering dlls. The component is marked as "Self-Registering". However, it seems that the files are not registered at all. As far as I know, the self-registering process is called automatically after the files are copied (and after the OnMoved event).

Any ideas what´s going wrong?

Thanks
Wincor

Also, make sure that any dependencies for the DLL(s) are present and avilable before the registration is attempted.

Wincor
02-03-2005, 03:56 AM
The dlls can be registered with regsvr32.exe. All dependencies are available, too. Another Installshield raised a errormessage with all components unable to self-register. But here all seems to work fine (but the components aren´t registered).

Any other hints?

Somebody
02-03-2005, 03:03 PM
When your install displays the self registration errors dialog, do not abort or end your install at that point. Instead, let the self registration error dialog remain on the screen asking for your input. Now try to manually self register some of the files using regsvr32.exe, that are being displayed as causing problems in the self registration errors dialog. This may give you a clue on what may be causing you problems at the same time the install is failing. For example, maybe you will discover you need to rearrange the order of your components, so some files are being registered before other files.

DLee65
02-03-2005, 04:22 PM
I remember a long time ago that a former employee (who helped train me) mentioned that self registration did not always work because of the order in which files are installed.

Here are some of the things I do to ensure registration:
1. Ensure that all dependent files appear at a higher level in my Setup feature / component structure.
2. Ensure that dependent files get registered (when appropriate) first
3. For custom COM objects I have a function that queries all our OCX and DMC (custom ocx files) found in TARGETDIR and registers each one individually. I call the function in the On Moved event.
4. If the files in question are part of your support files, I use the command ChangeDirectory(SUPPORTDIR) before registering and unregistering files.

ward.bowman
02-14-2005, 03:09 PM
I had this same problem with installshield 10.5.

The batch registration was not registering any of my DLLs.

What I found was that I needed to change dir to the directory my dlls were in. Luckly they are all in one directory, so that saved me. If your files are in seperate directories, I think you can change dir by catching the "locked" call back.

So after the files are put on the Machine, you can trigger on the Moved event and change the directory there.
function OnMoved()
begin
ChangeDirectory ( TARGETDIR );
end;

Wincor
02-15-2005, 03:30 AM
Thanks for all your replies.

The problem seemed to be a locked file in the windows directory (two font files and a device driver), so the self registering process didn´t register any file (even those in my targetdir).

Installing those files manually from the script after the copy and registration job was done solved this issue. Maybe not the best solution, but it works.

Cheers
Wincor