以编程方式创建/删除 Windows Media Services 发布点
我正在寻找一个 .NET 包装器,以通过 WMI 以编程方式创建和删除 Windows Media Services 发布点。
我不可能是唯一一个想通过 .NET 做到这一点的人,所以在我重新发明轮子之前,有人见过任何代码示例来做到这一点吗?
I'm looking for a .NET wrapper to programmatically Create and Delete Windows Media Services publishing points through WMI.
I can't be the only one to ever want to do this through .NET, so before I re-invent the wheel, anyone seen any code samples out there to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Windows SDK 7.1 中有以下文件,可以作为起点。
Windows\v7.1\Samples\multimedia\windowsmediaservices9\jscript\addPub.js
In the windows SDK 7.1 there is the following file, could be a starting point.
Windows\v7.1\Samples\multimedia\windowsmediaservices9\jscript\addPub.js
我正在使用媒体服务 9 SDK,其记录为 这里。 SDK 与运行时组件捆绑在一起,因此您需要从安装了运行时的 Windows Server 计算机复制
Microsoft.WindowsMediaServices.Interop.dll
和WMSServerTypeLib.dll
。我在C:\Windows\System32\windows media\server
中找到了它们。然后,注册类型库并添加对 Interop 程序集的引用。然后,要使用 SDK:
我包含了克隆,因为在尝试在远程计算机上添加新的发布点时遇到错误(
存根收到错误数据
)。我看到另一个线程中有人遇到了同样的问题,所以我想与其与之抗争,不如创建一个模板发布点并将所有新点创建为该点的克隆。I'm using the Media Services 9 SDK which is documented here. The SDK is bundled with the runtime components, so you'll need to copy
Microsoft.WindowsMediaServices.Interop.dll
andWMSServerTypeLib.dll
from your Windows Server machine with the runtime installed. I found them atC:\Windows\System32\windows media\server
. Then, register the type library and add a reference to the Interop assembly.Then, to use the SDK:
I included cloning because I encountered an error (
The stub received bad data
) when trying to add a new publishing point on a remote machine. I saw another thread where someone had the same issue, so I figured instead of fighting it, I would just create a template publishing point and create all of the new points as clones of that.