How should I go about moving Component Services to a new server?

1.3k Views Asked by At

We're moving our test server onto a new box, and I need to migrate all of our components that are in Component Services to the new box. We have all of the COM dll files located in sub folders in a COM directory on the server, and we want to copy that entire directory and register all the applications in Component Services just like they are. They will need to have the same credentials and everything.

I can use the COMAdminCatalog stuff and automate Exporting and Installing the applications (exports a CAB file), but that will copy the dlls and everything, and we don't want that, because it won't put them back in the right spot. Although if I could pull the directory they were in, and then specify that directory on the install, that would be okay. I can't figure out how to get the directory of the dll though. And what if there are two dlls, how would that work?

Any ideas?

2

There are 2 best solutions below

0
On

I converted the above steps to a Powershell script that you can use for automation and so on if you have a lot of components to move:

New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT;

$class = "MyObject.MyClassName";
$clsid = (gp HKCR:\$class\Clsid).'(default)';
$path = $(gp HKCR:\CLSID\$clsid\InprocServer32).'(default)';

echo "Component path = $path";

You need to set $class to be a name of an object you know exists in the component you'd like to move.

0
On

You could export and then install on the new machine and then reregister all the dlls. This will update the details in each COM package on your COM+ server. You can find the location of the dlls by looking it up in the registry.

If your COM object is

Project.Object

Take a look at

HKEY_CLASSES_ROOT\Project.Object\CLSID\

get the default Value then look up

HKEY_CLASSES_ROOT\CLSID**YOURCLSID**\InprocServer32

This key will give you the full path of the dll. Delete all those dlls, and reregister (using regsrv32 ) all the dlls in the place you want them.

Should give you a place to start.