0

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?

4

2 回答 2

0

您可以导出然后安装在新机器上,然后重新注册所有 dll。这将更新您的 COM+ 服务器上每个 COM 包中的详细信息。您可以通过在注册表中查找来找到 dll 的位置。

如果您的 COM 对象是

项目.对象

看一眼

HKEY_CLASSES_ROOT\Project.Object\CLSID\

获取默认值然后查找

HKEY_CLASSES_ROOT\CLSID**YOURCLSID**\InprocServer32

该键将为您提供 dll 的完整路径。删除所有这些 dll,并在您想要的位置重新注册(使用 regsrv32 )所有 dll。

应该给你一个开始的地方。

于 2009-10-09T22:01:03.113 回答
0

如果您有很多组件要移动,我将上述步骤转换为可用于自动化等的 Powershell 脚本:

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";

您需要将 $class 设置为您知道要移动的组件中存在的对象的名称。

于 2015-05-29T10:48:13.177 回答