码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2015-02-02 19:27:06      阅读:235      评论:0      收藏:0      [点我收藏+]

标签:

    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/

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

标签:

原文地址:http://www.cnblogs.com/llhua/p/4268388.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!