Wednesday, November 20, 2013

Microsoft and Citrix putting pictures of scripts in documents...

Come on guys, a little more effort than that.  How are you supposed to copy paste an image?

The script is the following:

It's supposed to pull the application and command-line to execute it in AppV5.  I got the script from this document:
http://www.microsoft.com/en-us/download/details.aspx?id=40885


"PackageName,Application Name,ApplicationPath"|out-file .\appPath.txt -Append
foreach($pkg in (gwmi -Namespace root\AppV -Class AppVClientPackage -Filter "IsPublishedGlobally = true"))
{

    $apps=gwmi -Namespace root\AppV -Class AppVClientApplication -Filter "PackageID = '$($pkg.PackageId)' and PackageVersionID = '$($pkg.VersionId)'"

   foreach($app in $apps)

   {

      $rootfolder=(Get-ItemProperty "HKLM:\Software\Microsoft\AppV\Client\Packages\$($app.PackageID)\Versions\$($app.PackageVersionID)\Catalog").Folder

      $appPath=$app.TargetPath.Replace("[{AppVPackageRoot}]",$rootFolder)

      "$($pkg.Name),$($app.Name),$($appPath)"|out-file .\AppPath.txt -Append
   }
}

No comments: