Install shared file - 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!

Heffer
Posts: 5
Joined: Sun Nov 28, 2010 1:46 pm

Install shared file

I have a question to topic: 9066 / Shared File / http://www.advancedinstaller.com/forums ... unt#p23065

If my file installed has the same location but not the same GUID should i use the "Shared Dll Reference Count" attribute on the Organization page ?

I tried this but the reference count in the Windows registry [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls] is not incremented.
The value is always set to '1'.

Regards
Wolfgang
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Install shared file

Hi Wolfgang,
but not the same GUID
Please keep in mind for a component to be shared among multiple packages, as my colleague Cosmin mentioned in his post:
  • the component of the file (in the Organization page) must use the same GUID and the same name in all packages
By enabling "Shared Dll Reference Count" option for a component, Windows Installer increments the reference count in the shared DLL registry of the component's key file.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Heffer
Posts: 5
Joined: Sun Nov 28, 2010 1:46 pm

Re: Install shared file

Hello Mihai,

i am a little bit confused. For testing i build a new msi-package with Microsoft Visual Studio. If i am looking with InstEd into the Component-Record of my file is see:

Componet ComponetId Directory Attributes Condition KeyPath
C__0DC500E85467493D8CE49E331C840BCE {096B6E36-ACE2-6D39-6C14-AEF28F3637C7} SystemFolder 0x0008 ....

(C__0DC500E85467493D8CE49E331C840BCE is the file COMDLG32.OCX)

If i am looking in the AdvancedInstaller-package i see:

Componet ComponetId Directory Attributes Condition KeyPath
COMDLG32.OCX {AD953874-3684-4AEC-AE8B-153C360FB562} SystemFolder 0x0008 ....

The GUIDs are different, but when i install the Visual Studio msi-package after the AdvancedInstaller-package the shared reference count for the file is incremented by 1.

Regards
Wolfgang
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Install shared file

Hi Wolfgang,

Enabling "Shared Dll Reference Count" option for a component is an older deprecated method and it's not recommended.
If you need to have shared components, please use the method my colleague Cosmin mentioned.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”