mstaszew
Posts: 2
Joined: Mon Aug 25, 2008 8:34 pm

Auto register DLL not working

I am using version 6.5.1 of the freeware. I have started a new "Simple" project. I have a DLL that exports DLLRegisterServer and DLLUnregisterServer that is to be installed. I have edited the properties of the DLL so that the "Auto register file (DLL, OCX, etc)." is checked. I have rebuilt the .msi. When I run the MSI everything works correctly except for the DLL registration which does not execute or fails. There are no error messages and the DLL can be registered using regsvr32 from the command line. I have executed the MSI using the "Run and Log" option and have reviewed the log, but to be honest I do not know what I am looking for. I have searched the log for "regsvr" and see nothing. I do see the following lines of text...
MSI (s) (B0:64) [15:24:50:467]: Doing action: RegisterTypeLibraries
Action 15:24:50: RegisterTypeLibraries. Registering type libraries
Action start 15:24:50: RegisterTypeLibraries.
Action ended 15:24:50: RegisterTypeLibraries. Return value 1.
MSI (s) (B0:64) [15:24:50:608]: Doing action: SelfRegModules
Action 15:24:50: SelfRegModules. Registering modules
Action start 15:24:50: SelfRegModules.
SelfRegModules: File: Registering modules, Folder:
Action ended 15:24:50: SelfRegModules. Return value 1.
MSI (s) (B0:64) [15:24:50:749]: Doing action: RegisterComPlus
Action 15:24:50: RegisterComPlus. Registering COM+ Applications and Components
Action start 15:24:50: RegisterComPlus.
MSI (s) (B0:64) [15:24:50:842]: Note: 1: 2205 2: 3: Complus
MSI (s) (B0:64) [15:24:50:874]: Note: 1: 2228 2: 3: Complus 4: SELECT `ComponentId`, `FileName`, `Component`.`Directory_`, `ExpType`, `Component`.`Action`, `Component`.`Installed` FROM `Complus`, `Component`, `File` WHERE `Complus`.`Component_` = `Component` AND `Component`.`KeyPath` = `File`.`File` AND (`Action` = 1 OR `Action` = 2)
Action ended 15:24:50: RegisterComPlus. Return value 0.
And a couple of lines that have "ComponentRegister" in the them, but there appears to be one of those lines for each of the files that are being installed. Any help is appreciated. I can send the entire execution log if needed. Thanks.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Auto register DLL not working

Hi,

I'm not sure why you are encountering this behavior. In the log fragment you posted I noticed these lines:

Code: Select all

Action start 15:24:50: SelfRegModules.
SelfRegModules: File: Registering modules, Folder:
Action ended 15:24:50: SelfRegModules. Return value 1.
The "File" and "Folder" attributes are empty, therefore Windows Installer doesn't register any file. This usually happens if the file is marked for registration but it is not installed. Can you please send us the complete log of the installation to support at advancedinstaller dot com so we can investigate it? Also, please attach the AIP file you are using.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mstaszew
Posts: 2
Joined: Mon Aug 25, 2008 8:34 pm

Re: Auto register DLL not working

Thanks for the reply, Cosmin. Email sent with log and .aip file attached.

Michael
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Auto register DLL not working

Hi Michael,

I investigated the log and the AIP and I didn't find a problem.

When registering a DLL with "regsvr32.exe", the "DLLSelfRegister" function will be called. Please make sure that in your DLL the "DllRegisterServer" function has the same functionality as "DLLSelfRegister".

Note that using the self register method has many disadvantages and limitations:
http://msdn.microsoft.com/en-us/library ... S.85).aspx

If the "DllRegisterServer" function has the same functionality as "DLLSelfRegister" and the DLL is still not registered, the solution is to use "regsvr32.exe" through a custom action. Note this can be done only in a Professional, Java Application or Enterprise project.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
k1nz1
Posts: 2
Joined: Wed Dec 03, 2008 5:15 am

Re: Auto register DLL not working

I am using professional and have similar problems with installing mozctlx.dll from the xulrunner package for embedding mozilla.

I have looked around but have not found a specific set of instructions for your suggestion below.
If the "DllRegisterServer" function has the same functionality as "DLLSelfRegister" and the DLL is still not registered, the solution is to use "regsvr32.exe" through a custom action. Note this can be done only in a Professional, Java Application or Enterprise project.
Can you please point me to this info?


Thanks.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Auto register DLL not working

Hi,

For what you need you can try following these steps:
- in the Custom Actions page create a new "Exe with working Dir" custom action under "InstallExecuteSequence" -> "Install"
- when prompted to choose an installation folder, select "Windows Volume\Windows\System"
- in the Custom Action Properties page set the "Full Path" field to:

Code: Select all

regsvr32.exe
- use the "Edit" button next to this field to select the file you want to register
- make sure that the file reference is enclosed by quotes (")
- create similar custom actions for the rest of the files.

For example, the "Full Path" field should look something similar to this:

Code: Select all

regsvr32.exe "[#mozctlx.dll]"
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
k1nz1
Posts: 2
Joined: Wed Dec 03, 2008 5:15 am

Re: Auto register DLL not working

Thank you for your assistance.

I was unable to get the dll to load because it requires running regsvr32.exe in the same folder as the dll. But I was able to run a .bat file using the same method that did the trick.
scottsri
Posts: 1
Joined: Wed Nov 05, 2008 4:30 pm

Re: Auto register DLL not working

Hi , I am trying to do very same thing - Does anyone have a sample command line? I need to register a series of DLLs for Codecs... Can I use a relative path as with other advanced installer features ?
?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Auto register DLL not working

Hi,

Does the approach I explained in this thread work for your files? If not, can you please give me more details about the problem you are encountering?
Can I use a relative path as with other advanced installer features ?
If you are referring to custom actions, they can use relative paths, but this is not recommended. A custom action should always use full paths.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bobwill
Posts: 4
Joined: Fri May 08, 2009 4:32 pm

Re: Auto register DLL not working

I'm having a similar problem where DLLs are not being registered. This was working fine but has broken recently (not sure why or what it might be associated with but it's the same on XP and Win7). There are no errors in the logfile but it does show blank entries for SelfRegModule.

The DLLs were set to self-register so I tried the 'Extract registration info from native library' option instead. Now the installation fails with this error:

MSI (s) (10:F0) [12:28:18:198]: Note: 1: 1402 2: UNKNOWN\Components\A65BE6A1938988444887585D0E3D0C75\9EE4F16CBC1A67E469942B3154CC7F3D 3: 5
Error 1402. Could not open key: UNKNOWN\Components\A65BE6A1938988444887585D0E3D0C75\9EE4F16CBC1A67E469942B3154CC7F3D. System error 5. Verify that you have sufficient access to that key, or contact your support personnel.
MSI (s) (10:F0) [12:28:23:466]: Product: Locator Plus -- Error 1402. Could not open key: UNKNOWN\Components\A65BE6A1938988444887585D0E3D0C75\9EE4F16CBC1A67E469942B3154CC7F3D. System error 5. Verify that you have sufficient access to that key, or contact your support personnel.

So I took out the DLLs, reinserted them and went back to the old settings. But now I'm still getting the above error which is a bit disheartening.

I'm running AI 7.1.3 Enterprise.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Auto register DLL not working

Hi,

I'm not sure why you are encountering this behavior. Can you please send us the .AIP (project) file you are using and a verbose log of the install process to support at advancedinstaller dot com so we can investigate them?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”