我正在编写一个com+脚本,但是我遇到了一些我不清楚的地方。如何才能确定通过paramaterizedProprty方法公开了哪些值?我想这一定是个哈希表什么的。
$comAdmin = New-Object -com ("COMAdmin.COMAdminCatalog.1")
$applications = $comAdmin.GetCollection("Applications")
$applications.Populate()
foreach ($application in $applications) {
$components = $applications.GetCollection("Components",$application.key)
$components.Populate()
foreach ($component in $components)
{
# What other values are available besides "DLL"
$dllName = $component.Value("DLL")
}
}PS System.__ComObject#{6eb22871-8a19-11d0-81b6-00a0c9231c29} C:\Users\myself> $component|gm -MemberType ParameterizedProperty TypeName:$component|gm MemberType定义(string) {get} {set}
发布于 2017-06-14 15:48:23
我相信,除非您拥有这些文档,否则您无法确定集合中可以使用哪些值。所有这些值都只是字符串。
您在这个位置有一个完整的列表:https://msdn.microsoft.com/en-us/library/windows/desktop/ms688285(v=vs.85).aspx
https://stackoverflow.com/questions/44547417
复制相似问题