cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
AaronM
Level 6

[ProgramFilesFolder]Reference Assemblies folder for globally registered assemblies

Our company has several products that can be installed independently of each other. There are some registered files (COM or GAC respectively depending on type) that are common between some of the products.

Wrong way
Have each product installer include its own components in its own folders and registration of the common files. In this scenario, the last product installed has its path in registration. Everything is fine until that last product installed is later uninstalled while earlier products still installed.

1. Install ProductA
a. Include AssemblyX and register with COM or GAC
b. COM/GAC's path is mapped to [ProgramFilesFolder]CompanyName\ProductA
2. Install ProductB
a. Include AssemblyX and register with COM or GAC
b. COM/GAC's path is updated to [ProgramFilesFolder]CompanyName\ProductB
3. Uninstall ProductB
a. ComponentA is unregistered in COM/GAC
b. ProductA will fail since it expects AssemblyX to be available via COM/GAC

Correct way
Have AssemblyX installed in a shared folder location between the products and let Windows Installer do its magic of reference counting with the fixed file path. Uninstall will not trigger component unregistration since other products still referencing it.

Question
Now that I've settled on the correct solution of having a shared folder location for the respective assemblies registered with COM or GAC, the discussion now is centered on where?

One conventional option would be in [ProgramFilesFolder]CompanyName\Reference Assemblies.

However, I have noticed that Microsoft has been utilizing the [ProgramFilesFolder]Reference Assemblies location for several of their global assemblies. Attached is a screen shot of my particular computer, but obviously each computer would be different depending on applications installed. From what I can tell, this repository is used in both COM and GAC scenarios. They also opted to put all of their assemblies in a [CompanyName]\[ProductName] structure which somewhat invites others to utilize this common location as well.

Ultimately, I will probably end up going with the [ProgramFilesFolder]CompanyName\Reference Assemblies route.

I've done some searching, but haven't found any valuable information on the usage of [Program Files]\Reference Assemblies folder by companies outside of Microsoft. Anyone have any other insight?
Labels (1)
0 Kudos
(2) Replies
KathyMorey
Level 10

You might also consider Program Files\Common Files\Company Name. Program Files\Common Files is resolved as CommonFilesFolder in the Windows Installer Directory table.
0 Kudos
AaronM
Level 6

Thank you, I agree that CommonFilesFolder would be a more suitable solution.
0 Kudos