VB获取windows2008 R2 Remoteapp 发布的应用列表

    Dim oWMI, WQL, Instances, Instance
    
    Get base WMI object, "." means computer name (local)
    Set oWMI = GetObject("WINMGMTS:\\.\ROOT\CIMV2\TerminalServices")
    
    Create a WMI query text 
    WQL = "Select * from Win32_TSPublishedApplication"
    
    Get instances of Win32_TSPublishedApplication 
    Set Instances = oWMI.ExecQuery(WQL)
                        
    Enumerate instances  
    For Each Instance In Instances 
      Do something with the instance
      Wscript.Echo Instance.Alias or other property name
      Wscript.Echo Instance.Caption
      Wscript.Echo Instance.CommandLineSetting
      Wscript.Echo Instance.Description
      Wscript.Echo Instance.IconContents
      Wscript.Echo Instance.IconPath
      Wscript.Echo Instance.InstallDate
      Wscript.Echo Instance.Name
      Wscript.Echo Instance.Path
      Wscript.Echo Instance.PathExists
      Wscript.Echo Instance.RDPFileContents
      Wscript.Echo Instance.RequiredCommandLine    
      Wscript.Echo Instance.SecurityDescriptor
      Wscript.Echo Instance.ShowInPortal
      Wscript.Echo Instance.status
      Wscript.Echo Instance.VPath

    Next Instance

 

参考一下几个链接:
https://social.technet.microsoft.com/Forums/windowsserver/en-US/47439755-8d2d-4fbb-9d13-924f3a0296bc/how-to-get-remoteapp-program-list-in-win2008-r2?forum=winservergen

 

http://wutils.com/wmi/root/cimv2/terminalservices/win32_tspublishedapplication/vbscript-samples.html

 

http://wutils.com/wmi/root/cimv2/terminalservices/win32_tspublishedapplication/

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。