Failure To Register COM dll for use with Word - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

StuartSwift
Posts: 1
Joined: Tue Nov 27, 2012 12:31 pm

Failure To Register COM dll for use with Word

I am getting a failure when registering a dll using the Auto Register > Extract Registration info > Synchronisation Enabled option. The dll is registered on my local machine in a dev location, and is being referenced by a Word macro enabled template through the VBA references dialog.

I create an msi using advanced installer 8.8.1 and am installing both the dll and word template to different locations. If I use the extraction option then word fails to see the dll at it’s new location, but if I use Self Registration (which is not recommended) then my word template picks up the dll in the different location from where it was developed in.

This isn’t all though.

If I use the Extraction method, so my Word addin does not find the dll, I can then use the VBA references dialog to locate and attach the dll to my Normal template, and all of a sudden my addin finds it too. Both addins (the normal and my own) can use the dll without any COM failures, which would indicate the dll is correctly registered.

However, if I then remove my reference in the Normal template, uninstall my package and search the registry for my dll, I find 5 entries that have not been removed. This leads me to think that these entries were put there, not by the Advanced Installer msi package, but when I referenced my dll in the normal template. These entries appear crucial to Word locating my dll correctly.

Can you shed any light on this issue. I can supply my dll and addin (they are very simple hello world tests), the AI package and msi, the run log, and the registry settings that remain afterwards.

Im using windows 7 64bit & Office 2010 32bit for both the development and test environment.

Thank you.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Failure To Register COM dll for use with Word

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

I'm not sure why you are encountering this behavior. Can you please verify if all the required registry entries are added on "Registry" page when you enable the "Extract registration info from native library" option for the related DLL?

Also, if you think there are registry entry required for registration that are not added automatically on "Registry" page when the above option is enabled, then can you manually add them on "Registry" page and see if the behavior still persist? If so, then can you please send us the .AIP (project file), a verbose log of the installation and the related DLL and addin files to support at advancedinstaller dot com so we can investigate them?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MattCope
Posts: 4
Joined: Tue Nov 27, 2012 12:54 pm

Re: Failure To Register COM dll for use with Word

hi daniel
thanks for your response
im answering here on behalf of stuart
im not sure about how to test your first suggestion as i'm not knowledgable enough to know what registry settings should actually be captured by the "Extraction...." option, and therefore if any are missing. the fact that once Word know's where the physical location of the dll is it can reference the dll with no "dll hell" failures is what indicates to me that it is registering ok(ish).
i can certainly test your second suggestion by manually importing the settings, that i discovered were still in the registry after it's removal, into the package and then testing that.
i will get on this as soon as possible and get back to you with results
regards
matt

ps i have attached the original addin, dll, aip, msi and runlog
Attachments
HelloWorld.zip
Failure To Register COM dll for use with Word parts
(172.67 KiB) Downloaded 213 times
MattCope
Posts: 4
Joined: Tue Nov 27, 2012 12:54 pm

Re: Failure To Register COM dll for use with Word

ok

i have managed to create and test 3 aip files, 3 msi packages and 3 install logs
these are to demonstrate:
self-registry,
extraction,
addition of remaining registry keys back into the extraction package

i successfully installed boht the self-reg and addition packages, but the dll failed to be found when using the extraction.

please see attached zip, which also contains the 6 extracted reg files from the registry. these were gained after i had manually informed Word where it could locate the required dll by simply attaching it to the normal template

any help would be great
cheers
matt
Attachments
MSTest.zip
self-reg, extraction & addition parts
(477.79 KiB) Downloaded 204 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Failure To Register COM dll for use with Word

Hello Matt,

Please give us some time to investigate and we'll get back to you as soon as we have a conclusive answer.

Thank you for your patience and understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MattCope
Posts: 4
Joined: Tue Nov 27, 2012 12:54 pm

Re: Failure To Register COM dll for use with Word

hey daniel
no problem about that, we're good to use the self registry for the time being.
im more concerned that it might be something that we're not doing correctly here, but the bizarre thing is that this problem only occurred recently, in possibly the last 2 weeks.
could it be related to another security update from good old microsoft?
can you confirm though, that there is a problem and that it's not necessarily something that we're failing to do here?
regards
matt
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Failure To Register COM dll for use with Word

Hello Matt,

You may encounter this behavior if you are not using an elevated instance of Advanced Installer. In this case the registration info extraction may cause partial results. So, can you open the Advanced Installer using "Run as administrator" context menu option, re-enable the registration info extraction and tell us if the behavior still persist?

Here's attached a sample, created using an elevated instance of Advanced Installer 8.8.1, which have enabled the extract registration info option.
sample.zip
(7.62 KiB) Downloaded 211 times
Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MattCope
Posts: 4
Joined: Tue Nov 27, 2012 12:54 pm

Re: Failure To Register COM dll for use with Word

thanks daniel
we've tested that here now and unfortunately this has not made a difference.
i have supplied a zip with 4 test msi packages inside.
1 MSTest_Extraction: this is the original file using extraction
2 MSTest_Extraction_Admin: this is the original file but opened as administrator and auto-extracted
3 sample_diff: This is your sample msi, we opened as administrator and added the word addin into a different install location from the dll.
4 sample_same: This is your sample msi, we opened as administrator but critically we added the word addin into the same install location as the dll.

the tests we performed was to install the msi packages in order of 1 to 4 and all failed except 4. The reason i believe that 4 did not fail is purely because the dll was installed into the same location as the word addin, and not because it was registered on the target machine differently.
we then installed number 1 again to check if it failed and the result was slightly different. in the VBA references dialog the MSTest.dll reference did not show as missing but Word believed it to be at the previous location as set by msi package 4. since the dll was no longer at this location the VBA failed with error 429 i believe.
if you need anything else from me rgarding these tests then please let me know.
regards
matt
Attachments
MSTests_2.zip
Test msi packages
(516.35 KiB) Downloaded 198 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Failure To Register COM dll for use with Word

Hello Matt,

I've observed that your attached MSI packages (from 1 to 4) contain a small amount of extracted registry entries. Here's attached a sample, created using an elevated instance of Advanced Installer 8.8.1 on a Windows Vista Service Pack 2 x64 machine, which have enabled the extract registration info option with synchronization disabled (in this way the registration data is read only once). As you will see there are a lot of extracted registry entries for the related dll.
sample.zip
(7.61 KiB) Downloaded 211 times
So, can you open Advanced Installer using "Run as administrator" context menu option and, then try to create an installation package using the extract registration info option with synchronization disabled for the related dll file on multiple clean machines and see if the behavior still reproduce? If so, can you tell us what is your build machine OS configuration?

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

Return to “Common Problems”