Windows Server 2012上的PowerDesigner COM对象为空

时间:2018-06-12 08:15:54

标签: powershell com windows-server-2012 powerdesigner ole-automation

在Windows Server 2012上编写PowerDesigner脚本时遇到问题。 我们在Windows 10和Windows 7上没有问题(我们在几台机器上试过它)。

我们正在从PowerShell启动PowerDesigner,如下所示:

$PowerDesigner = New-Object -com powerdesigner.application
Add-Type -path “C:\Program Files (x86)\Sybase\PowerDesigner 16\Interop.PdCommon.dll”
Add-Type -path “C:\Program Files (x86)\Sybase\PowerDesigner 16\Add-ins\Microsoft SQL Server 2005 Analysis Service\Interop.PdPDM.dll”

在Windows Server 2012 R2上,$ PowerDesigner对象的所有属性都设置为$ null。 如果我们尝试将属性设置为其他值,则会出现错误。 例如,声明

$PowerDesigner.InteractiveMode = 1

因以下错误而失败:

Exception setting "InteractiveMode": "Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))"

PowerDesigner版本为16.1.0.3637。

0 个答案:

没有答案