Microsoft App-V Self service tool

One of my customers asked for a ‘self service tool’ for their users to remove Microsoft APP-V pkg files from their profiles. Because there’s no direct relation between the registry values and the location of the pkg files I had to be creative with a search within this script:

[codesyntax lang=”powershell”]

[/codesyntax]

 

A small disclaimer: Powershell and scripting is not my day to day work so it’s possible that this script has a couple of flaws. I did a lot of copy/pasting from a couple of blogs and MS posts but feel free to use this script. It’s a draft version thus I can’t guarantee that this will work but in my test environment it does. If you have additional comments just drop a comment so I can optimize this script.

The following two tabs change content below.

Kees Baggerman

Kees Baggerman is a Staff Solutions Architect for End User Computing at Nutanix. Kees has driven numerous Microsoft and Citrix, and RES infrastructures functional/technical designs, migrations, implementations engagements over the years.

3 comments

  1. Patrick S. says:

    The WMI namespace for App-V has an Application class that you could use to get the App-V apps. This would probably be a little safer than reading registry keys. You could also use this class to get the application’s package GUID, which is the basis for part of the PKG folder name.

    For example, to fill in your drop-down box…

    $apps = Get-WmiObject -Class “Application” -Namespace “root\microsoft\appvirt\client” |
    Sort-Object Name
    foreach ($app in $apps)
    {
    $DropDown.Items.Add([System.String]::Format(“{0}”, $app.Name))
    }

  2. […] This post was mentioned on Twitter by ChaosNL, Kees Baggerman. Kees Baggerman said: @KBaggerman: New post: Microsoft New post: App-V Self service tool http://bit.ly/ftM5ZO #AppV #Microsoft #Pkg […]

  3. k.baggerman says:

    Patrick S. :

    The WMI namespace for App-V has an Application class that you could use to get the App-V apps. This would probably be a little safer than reading registry keys. You could also use this class to get the application’s package GUID, which is the basis for part of the PKG folder name.

    For example, to fill in your drop-down box…

    $apps = Get-WmiObject -Class “Application” -Namespace “root\microsoft\appvirt\client” |
    Sort-Object Name
    foreach ($app in $apps)
    {
    $DropDown.Items.Add([System.String]::Format(“{0}”, $app.Name))
    }

    Patrick, thanks for your comments but my test enviroment doesn’t support the namespace in combination with the Class application so it will take some time to re-write the script using WMI. I agree that WMI is a bit safer than plain registry keys.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.