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/

posted @ 2015-02-02 17:51  学习记录  阅读(413)  评论(0编辑  收藏  举报