This application is a part of the installation system that I use. My installation process uses an input XML file that is created by the application, to deploy and register the assemblies in the same locations as in the deploying machine. Using this method I reduce many errors. You can use this application to test your applications in a production environment. You can test and see if all of your application references match the files on your production server and to find out any existing problems.
The code is pretty straight forward. The only complicated part was to find out if a given assembly is registered as a COM+ component. To check it out, you need to get the COM+ component CLSID from COM+ using comadmin.dll, find in registry the CLSID
InprocServer32 Key, and check if
InprocServer32 Assembly string value matches the given assembly full name.
To navigate through the COM+, I use a wrapper assembly of comadmin.dll which I created using tlbimp.exe. The deploying code is a reference to the wrapper assembly of COM+ 1.5 comadmin.dll. If you are working with COM+ 1.0, you need to recreate the wrapper assembly using tlbimp.exe.