VMware Horizon Published App-v applications

As you probably know ThinApp is tightly integrated with VMware Horizon. ThinApp is an excellent technology to deploy legacy applications or solve application conflicts. Unfortunately not everyone is using this technology. Other companies might use for example Microsoft App-v to deploy their applications.

App-v is a widely used application virtualization technology and works very well, it is just not integrated with VMware Horizon.

One of the questions I recently came across was this one:

How can you deploy App-v packages to your VMware Horizon Apps (RDS) environment and deliver them as published applications through the VMware Horizon client or Identity Manager Portal?

What I consider to be the preferred way to deploy App-v packages in your instant clone Horizon Apps environment is precaching the packages in the base image (or parent vm).

If you are only using Horizon published apps, there is no need to setup an App-v infrastructure.

In your parent vm, do the following:

Enable 8dot3 in registry:

  • Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
  • Name: NtfsDisable8dot3NameCreation
  • Value: 0
  • Type: DWord

Execute these powershell commands:

  • Enable-Appv
  • Set-AppvClientConfiguration -ENABLEPACKAGESCRIPTS 1
  • Set-AppvClientConfiguration -SHAREDCONTENTSTOREMODE 0
  • Set-AppvClientConfiguration -PACKAGESOURCEROOT “Path_To_Package_Sources”

Create a scheduled task that executes this powershell script at startup of the instant clone. The script will add all the App-v packages on the package source share to the local cache. The DynamicDeploymentConfiguration parameter ensures the application shortcuts are added to the “C:\ProgramData\Microsoft\Windows\Start Menu\Programs” folder.

$path = “\\Path_To_Package_Share”

$names = Get-ChildItem $path -Recurse -Force | where name -like *.appv | select Name

$packagenames = New-Object System.Collections.ArrayList

$x = foreach ($name in $names){$packagenames.Add($name.Name.Substring(0,$name.Name.Length-5))}

foreach  ($packagename in $packagenames){

Add-AppvClientPackage ($path+$packagename+”\”+$packagename+”.appv”) -DynamicDeploymentConfiguration ($path+$packagename+”\”+$packagename+”_DeploymentConfig.xml”) | Publish-AppvClientPackage -global | Mount-AppvClientPackage

}

Because Instant clone vm’s don’t go through the complete startup cycle, sometimes the script does not run and App-v packages are not synced. To get around this, you can configure the scheduled task to repeat itself 3 times (every 1 minute).

Command: %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe

Argument:-ExecutionPolicy Bypass -file “\\Path_to_Powershell_Script.ps1”

Make sure this scheduled task runs under the system account and runs with highest privileges.

Every time an App-v package is updated or a new package is added to the App-v package source share, it will be automatically precached at reboot of the instant clone RDS server. The default cache location is under %programdata%\app-v

Once this is done, you can go ahead and publish the app-v package.

Publish the shortcut under the C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ folder and you are ready to go.

App-v packages that are updated, don’t need to be re-published. The shortcut under the programs folder will not change, thus no need to change it in the application pool. Only new applications need to be added to the application pool.

 

 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *