Harish
Posts: 35
Joined: Tue Dec 27, 2005 9:25 am

Dlls are not registering

Hi,

I am using AdvancedInstaller 3.1.5 Trial version. When I am self-registering the dll's that is in Files and folders, double clicking on the file and checking the option self register. Its throwing an xxx.dll failed to register HRESULT-2147024770 contact your system administrator What is the problem why dlls are not registering is there any other way of registering the dll's.

Thanks,
Harish.Y
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

The DLL files you are trying to register might not be COM modules (therefore not supporting the "DllRegisterServer" function).

In order to determine if this is the case, you may try registering them manually using the "regsvr32" utility. Use the following command line in order to register a DLL or OCX file:

Code: Select all

regsvr32 file_name
The following command may be used to unregister a COM module:

Code: Select all

regsvr32 /u file_name

If the registration fails when issuing the "regsvr32" command, then the respective files do not support registration. In this case, you need to deselect the "Auto register file" checkbox in the "File properties" dialog in Advanced Installer.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
Harish
Posts: 35
Joined: Tue Dec 27, 2005 9:25 am

Hi,

Oh thanks for the information. can you detaily explain from the command line registration can be done. I have a set of 50 to 60 dll's can all be done at a time in a single command.

Thanks,
Harish.Y
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

You will find a VBScript that can generate two batch files (one to register, one to unregister) DLLs/OCXs in a given directory, at:
http://www.freevbcode.com/ShowCode.asp?ID=3259

Observations:
1. You can set the output directory for the two batch files by modifying the line:

Code: Select all

Set mfd = mfso.GetFolder("C:\")
2. You can set the location of your DLL files by modifying the following line:

Code: Select all

SetDllRegText "C:\Your Project\Dev\"
Note that in both lines specified above you must include a trailing "\" in the path.

3. After executing the script you need to execute the "Register.bat" file that will be created in the location you set in step 1.

Hope this helps.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
Harish
Posts: 35
Joined: Tue Dec 27, 2005 9:25 am

That worked how to register a dll from the command line as you intially said like regsvr32 File_name. Can u please give me the steps.

Thanks,
Harish.Y
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

In order to use the "regsvr32" utility:
1. Open a command prompt window: Start -> Run, type "cmd" and press OK.
2. Change to the directory that contains the DLL file using the "cd " command:

Code: Select all

cd "My folder\My subfolder"
3. Execute the "regsvr32" utility as described above.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
Harish
Posts: 35
Joined: Tue Dec 27, 2005 9:25 am

Hi,

The thing u have written is already known to me. How can it be achieved command line registration of dll's from Advanced Installer.

Thanks,
Harish.Y
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

The "regsvr32" utility simply calls the "DllRegisterServer" function exported by a COM module. If the DLL does not export this function, the registration process fails.

Advanced Installer does the same thing (when using the "Self register" option), thus there is no need to call "regsvr32" from within AI. This command line utility should only be used outside of AI to test if a DLL or OCX file supports registration or not.

The new 3.6 version of Advanced Installer automatically detects whether a DLL or OCX file is a COM module and it will not allow the registration of a file that does not support this feature.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
Firefox
Posts: 8
Joined: Wed Feb 14, 2007 8:54 pm

Dll Registration

Hi there,

I have a merge module that puts a dll in the install directory this is a COM module, the DLLRegisterServer is an exported function. Within this function several registry keys that are meant to be set. I have selected self registration in the dll property within the merge module. When i run the install the COM Dll is registered (as i can sucessfully manually unregister it from the command line) yet non of the registry keys are being set that are in the DLLRegisterServer.

I found a way of making the install work but only for the first install attempt. I did this by changing the method the DLL is registered then recompiling the merge module. This made the install work for the next attempt only. If i then went back into the merge module and changed it again and compiled it would it work another time.

Is there anything anyone can suggest i try?

Thanks
matt.gardner
Posts: 2
Joined: Thu Apr 03, 2014 10:21 pm

Re: Dlls are not registering

Hi there

I'm having a similar issue regarding dll registration:

"Module Z:\somepath\some.dll failed to register. HRESULT -214024894. Contact your support personnel."

Choosing "ignore" (repeatedly) eventually finishes the msi install or upgrade (or repair).

These DLLs register fine if installing to local drive, but not to a mapped network drive.

Is there any way to either:

1) register dll's installed on a mapped network drive?, or

2) skip registration if installing to a newtrok drive?

Any help would be appreciated.

Matt.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Dlls are not registering

Hello Matt and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

I'm afraid that you cannot register a DLL from a mapped network drive. This is the default Windows Installer behavior. In order to be able to register your DLL you should make sure it is installed under an UNC path. Therefore, what you can do is to create your own custom action which will transform your DLL local path into an UNC path and, then will call the regsvr32.exe to register your DLL file using the UNC path.

Please take a look on "Get UNC path from a local path or mapped path" article which could be useful for you.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
matt.gardner
Posts: 2
Joined: Thu Apr 03, 2014 10:21 pm

Re: Dlls are not registering

Thanks Daniel

Only the consumer would have a clue as to the UNC path that a particular drive is mapped to (and invariably they don't have a clue either).

However I mat have hit on an approach that works - the help topic about registering DLL's says that self-registration is not recommended (which begs the question - why is this the default?), so after changing the registration option to "Extract registration info from native library" we don't get any registration errors and everything still appears to work as it should (touch wood).

Hope this helps others having this issue.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Dlls are not registering

You're welcome Matt. I'm glad you got this working using the "Extract registration info from native library" option. Also, I'm sure this will help future users in the same situation. Thank you for the follow up.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”