Q. How can I list all applications being published from a Windows Virtual PC virtual machine (VM)?

John Savill

December 28, 2009

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. Run the script below in the VM and all published applications will be listed.

strComputer = "."strNamespace = "rootcimv2TerminalServices"strQuery = "Select * From Win32_TSPublishedApplication"Set objSWbemServices = GetObject("winmgmts:\" & strComputer & strNamespace)Set colItems = objSWbemServices.ExecQuery (strQuery)For Each objItem in ColItems     wscript.echo objItem.NameNext

The script is shown running below.

C:>cscript listPubApps.vbsMicrosoft (R) Windows Script Host Version 5.7Copyright (C) Microsoft Corporation. All rights reserved.Microsoft Office Outlook 2003Microsoft Security EssentialsMicrosoft Office Word 2003EditNoteMicrosoft Office Access 2003Microsoft Office InfoPath 2003Internet ExplorerMicrosoft Office PowerPoint 2003Microsoft Office Application RecoveryMicrosoft Clip OrganizerMicrosoft Office Publisher 2003Microsoft Office Excel 2003BitLocker To Go ReaderMicrosoft Office Picture ManagerMicrosoft Office 2003 Save My Settings WizardMicrosoft Office Document Imaging

Related Reading:



Check out hundreds more useful Q&As like this in John Savill's FAQ for Windows. Also, watch instructional videos made by John at ITTV.net.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like