Disclaimer: This blog post is a part of series of CAS-APPV Conversion blog posts by Citrix. This blog tries to cover a CAS specific feature “Pre-Launch Analysis” and a way to achieve the same functionality in App-V. Readers are recommended to go through the Citrix blog link, before proceeding further.

1. Pre-Launch Analysis in Streaming (PLA)

Streaming introduced a variety of Pre-Launch Analysis capabilities as part of the profiling process.

Verifying Any, Minimum or a Maximum Version for any of the above applications was a utility an administrator could add in a profile, and it was ensured that the Streaming Client checks for the presence of such applications before attempting to launch a streamed app.

2. App-V equivalent of PLA
A modest answer to “if there exists an App-V equivalent of Pre-Launch Analysis” is NO. App-V 5.0 SP2 currently doesn’t have a feature that can be directly mapped to Pre-Launch Analysis of Streaming. App-V 5.0 SP2 although has the intelligence to detect and deploy a very specific dependency – the VC++ Runtime dependency. Check the blog here to know the details.

Coming back to PLA, that doesn’t mean this feature can’t be made to work in App-V. The workaround lies in a simple answer – SCRIPTS.

3. The workaround : SCRIPTS
Dependencies like above can be easily detected using specific Registry and File System entries. The same technique can be used for achieving an analysis in App-V. Administrators can very well author small scripts that can verify for the presence/ absence of a certain, minimum or maximum version of any dependent components. Moreover they have the control to schedule such scripts at any of the available timed events [Add-Package / Publish-Package / Start-Process and so on.]

This document will show a snapshot of such a script and when its scheduled to run. The sample script is aimed to detect the Java Runtime Environment Version 1.7 and above. If such a version is not found, one would expect to return a failure code and expect App-V to fail the event [Add / Publish/ Start Process]that follows the script.

@echo OFF


set KEY_NAME=”HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment”

set VALUE_NAME=CurrentVersion

FOR /F “usebackq tokens=1-3” %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO (

set ValueName=%%A

set ValueValue=%%C



if defined ValueName (

@echo Value Value = %ValueValue%

GOTO step2

) else (

@echo %KEY_NAME%\%VALUE_NAME% not found.

exit /b 1



if %ValueValue% geq 1.7 (

@echo Version Greater Than Equal to 1.7 Found

exit /b 0

) else (

@echo Version Greater Than Equal to 1.7 NOT Found

exit /b 1


4.2 Scheduling SAMPLE_JRE_SCRIPT



<Arguments>/C “[{AppVPackageRoot}]\..\Scripts\sample_jre_script”</Arguments>

<Wait RollbackOnError=”true” Timeout=”30″/>



5. Inference:

  1. The script is scheduled to run at the event – Publish Package
  2. Since it’s a batch script, we use cmd.exe and point to the location where the script resides.
  3. The attribute <Wait RollbackOnError=”true” makes sure that if the script returns an error code (non-zero), then event “Publish Package” is supposed to fail.

6. Conclusion:
There isn’t a direct mapping of this feature, exposed till App-V 5.0 SP2. Although, the functionality of Pre-Launch Analysis can be converted as easily into a script and embedded inside an App-V package. Administrators are encouraged to check if there exists any Pre-Launch Analysis configurations in the Streaming Profile (by viewing the same in Streaming Profiler), and if there exists any such configuration, try to map the same using scripts in App-V 5.0

The same technique can be achieved for detecting IE, DirectX, .NET Framework and MDAC too.