App-V 5 WMI Usage


Hi All,

Once you’ve installed the App-V 5 Client on a Windows Client or Server Operating System, what components of the Windows Platform is it actual using? There are multiple components that include:

  • NTFS File System
  • Registry
  • WMI

The NTFS file system has to be used so that you can add file system components i.e. Applications (dlls, exe, ini etc) and write application state information.

AppV_FS

The registry is used for App-V 5 Client configuration, package information and application state information.

AppV_REG

Finally on the list is WMI and this is the whole purpose of this post to show that App-V 5 leverages WMI for storing information. If you run the following command you will see all the elements of an App-V 5 Package.

Get-AppvClientPackage xml*

GetPackage

You can see the same elements are in the registry on the machine.

AppV_Reg_XML

They are also stored in WMI. To gain access to this information you can use a tool called “wbemtest” which is built into Windows. The namespace for App-V 5 is “root\appv”.

wbemtest_appv

There are three instances from the namespace and they are:

  • AppvClientPackage
  • AppvClientConnectionGroup
  • AppvClientApplication

If you select “Enum Instances…” you can enter the superclass name “AppvClientPackage” and it will return all the App-V 5 Client Packages on the machine.

Instance_ACP

 

Instance_ACP_Enum

To show the same output as the “Get-AppvClientPackage xml*” function if you double click the same PackageId it will return the same result as the App-V 5 PowerShell cmdlet.

Instance_ACP_XML

If you enter the superclass name as “AppvClientConnectionGroup” it will return all the connection groups on the machine. If you want to script this via PowerShell then you can use the inbuilt “Get-WmiObject” with the following parameters.

Get-WmiObject -Namespace root\appv -Class AppvClientPackage

If you want to test App-V 5 WMI functionality in your automation checks then you can use the following function:

Function Test-WMI($NS, $Class){

Get-WmiObject -Namespace $NS -Class $Class -ErrorAction SilentlyContinue |
Out-Null
$?

}

It will return “True” – Class and Namespace available, “False” – Can’t connect.

Test-WMI

SCRIPT DISCLAIMER
The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.

This post shows you all the components the App-V 5 Client uses, so if your troubleshooting App-V 5 make sure your can access all three.

David Falkus | Senior Premier Field Engineer | Application Virtualization, PowerShell, Windows Shell

Comments (0)

Skip to main content