Search code examples
comwindows-installerinstallshield

Proper way to register COM server already present on mapped drive


I'm developing a basic MSI installer with installshield 2015, and am trying to understand if there is a proper way, from an installer running on system A, to register an out-of-proc COM server installed on system B (over a network mapped drive) without actually including or delivering the executable file for that COM server. Normally I would use the command to extract COM registration info, but I think this relies on the same component including the file being registered because it uses MSI tables that don't include some information only available in the file table, I think. Is it proper to just manually convert the result of this into registry entries and remove the rows from the Class table and other COM tables?


Solution

  • I followed these steps:

    1. Add a component and add the file to be registered to the component
    2. Set the file as the key file
    3. Extract the COM data for the key file
    4. Clear the key file
    5. Delete the file from the component
    6. Ensure the component's path gets set to the location where the file resides
    7. Temporarily register the component on the machine
    8. Export the ProgID and CLSID registry keys for that component
    9. Delete the registry keys and values from the exported file that are already present in the install project's registry settings for the component
    10. Import the reg files into the install project
    11. Delete the "COM Registration" values and AppID records for the component, leaving only the direct registry updates associated with the component.
    12. Change the LocalServer32 or InprocServer32 value from a hard-coded path and filename to "[$componentname]filename" including quotes