1
votes

When I run the command "msiexec /fm " from the command line I noticed that certain HKLM registry keys are not being repaired. Same thing happens when I do this in C++ as follows: "MsiReinstallProduct(ProductCode, REINSTALLMODE_REPAIR | REINSTALLMODE_MACHINEDATA);"

The situation is this. I have a COM DLL that must be registered. This DLL's CLSID information is located in the MSI Registry Table. During install, MSI will place the information in the registry. If I manually delete the CLSID key and do a repair "msiexec /fm " then the registry key is properly restored. Simlarly if I manually change the path in the registry that points to the DLL, then MSI will repair the string back to it's original value.

There is one workflow where the key won't be repaired. If I drop a new version of the DLL on the machine to replace the one that came with the install, then MSI will no longer repair the CLSID key. It is as if MSI is deciding that this key should not be repaired since the DLL is not the same. I need a way of forcing MSI repair to fix the registry key even though the DLL has changed.

The command "msiexec /fdm" will in fact fix the registry key, however it will also update the file back to the original. In my case I have a new file because it was installed in a service pack. I want the new file to remain, and only fix the registry key.

1

1 Answers

2
votes

My guess is that the DLL file is key member in the component that holds the registry keys. By default the component is not reinstalled unless the key member is missing. You should specify a couple of more flags to ensure the component reinstall is triggered. E.g. /fpem

http://technet.microsoft.com/en-us/library/cc759262(v=ws.10).aspx#BKMK_Repair