jamesfreddyc

COM Register/Installer "RemovePreviousVersions = True"

Discussion created by jamesfreddyc on Oct 10, 2011
Latest reply on Oct 10, 2011 by Neil
I can't seem to shake these COM installer/registration issues I've had over the last 6mo's or so, and this one is a little new/different this time.  As the title suggests, I cannot seem to fully succeed at the whole process to properly install AND register my COM components that are packaged into a Setup project and deployed as the .msi to each user to install on their respective computers.

ArcGIS v10 COM Component .dll/.tlb
Implments ICommand/IToolBar (includes an IToolBarDef class too)

First, let me say that an initial run of this built .msi works great!  As long as there are no existing references to the .dll's being deployed.  That is, if the install is done on a workstation that has not had the COM component installed, then it runs exactly as desired.

So, with that said I am now attempting to re-deploy this COM component again because it contains some updates....

In the Setup Project/Assembly (by clicking directly on the project in the Solution Explorer), I have set RemovePreviousVersions = True and changed the Version as well (this automatically changes the ProductCode after clicking "Yes").  I then re-build the setup project.

(note: I can go thru all of the other items like my InvokeESRIRegAsm.dll and the registration code I have in the ICommand/IToolBarDef classes, but again, the first go/run of this deployment works so I don't think there is anything wrong with these).

(note2: I did set the Register property of the main .dll to vsdraDoNotRegister, but the .tbl is set to vsdrfCOM)

Results:

1.  If I simply copy the new .msi over to the target computer and run it, no errors and everything seems to install as desired.  But the original COM Component (a Toolbar) remains the same and does not contain the updates.  So, basically it doesn't seem to have registered.

2.  If, after step 1. above I do nothing and re-step thru the process of adding the .tlb by way of Customize--> AddFromFile... then again, nothing seemingly goes wrong but the toolbar doesn't register again.

3.  If prior to running the new .msi I go thru the process of manually unregistering the COM component by the Categories.exe, then removing the insalled component by way of the ControlPanel--> Add/Remove programs, then re-run the .msi ----- everything works as expected.

In summary --- I can accomplish what I need by simply performing step #3 above.  However, I do not have admin priv's and the install process is done throughout the organization by IT Department technicians and there are simply too many things to do for them to efficiently run the installations.  I need a way to simply provide them with the new .msi, have them run it, the new COM component is up and running. 

Any insight, input or comments are greatly appreciated.

James

Outcomes