The Situation:
I created a DLL in C# that uses COM to run Process.Startto run a program via web browser. I created an MSI using VS2010’s built-in Deployment project. I specify Guid properties for the objects in this DLL, but I never specify a location. When I run the MSI and choose to install for “Just Me”, registry keys are created in HKCU (current_user), as expected. I need it to run for all users, so when I run the MSI and choose to install for “Everyone”, registry keys are created in HKLM (local_machine), also as expected. Either way, once the MSI installs the DLL, the intranet web app using the DLL works just fine for me as admin (current_user), and for all users (local_machine), respectively.
Inside the main IT branch of my company, however, we can’t create our own MSIs. We have to send a request and our DLL/TLB files to somebody whose sole function is to create MSIs for vendors/in-house developers. When I run his MSI manually, and choose to install for “Everyone”, it again works as expected.
The Problem:
The MSI, however, needs to be run automatically as deployed software, and when this happens, the registry keys are only created in HKEY_CURRENT_USER, so they are not found when test users try to use the functionality. He said that the ALLUSERS property is set to 1, so this should work. Furthermore, when I asked him to make them install to the proper location (local_machine), he insisted that I need to make those changes inside my DLL, since “the MSI file does not create the registry keys, it is coming from the DLL during the install”. From what I read on various articles online, the MSI typically specifies where in the registry these keys are created.
The Question (also for TL;DR):
Is there any truth to his assertion that I need to specify registry location in my DLL? If so, how can I programatically specify these keys to go to HKLM by default? Right now, all I do is specify ComVisible, ClassInterface, Guid, ProgId, and ComDefaultInterface…I’ve never specified a location, with the exception being “Everyone/Just Me” in the MSI. I’m relatively new to COM objects and messing with my own creations in the registry, so I don’t want to jump down his throat saying I can’t do something he should be doing.
Thanks!
If I understand your question properly, you mean:
In this situation, I would suggest creating a merge module (MSM) instead of an installation package (MSI). Put all your setup logic (files, registry keys, custom actions, etc.) in the merge module.
Then write a simple MSI shell around that merge module for your own usage, and provide the merge module to your IT department, asking them to integrate it into their own installation package build process.