Monday, October 4, 2010

How to use the Command Line to upgrade App-V Sequenced App Packages

You can run the Microsoft Application Virtualization (App-V) Sequencer via the Command Line. Using this you can automate the sequencing of Applications that don’t require any special customizations in their guidelines for sequencing. At the same time, you can also automate upgrading a package using the command line sequencer.
1.    It is required to run the Command Prompt on the Computer that has the App-V Sequencer.
2.    Then, it is required to specify the location where the App-V Sequencer is installed. Check the following example.
cd C:\Program Files\App-V Sequencer
3.    Then, run the following commands.
SFTSequencer /UPGRADE:"pathtosource"

4.    In this sample, it is required to replace the text in quotes with the following values:

•    Pathtodecodefolder Specify the directory in which to unpack the SFT file.
•    pathtoupgrade Specifies the Windows Installer or a batch file that will be used to install an upgrade to the application.
•    pathtodestination Specifies the path and file name of the SPRJ file that will be created.
•    Pathtosource Specifies the directory location of the virtual application to be upgraded.

Moreover, it is possible to specify additional parameters while using the command line like this. It depends on the complexity of the Application you’re upgrading.

You can use the best following practices.
•    If the update is anything other than a standard MSI, you should contain it with a batch file or script. The command line sequencer should be able to grab everything even if it is a simple file copy or registry import.
•    Note that the UPGRADE and OUTPUTFILE values must be different. The command line sequencer will not update a package if the source path specified in the /UPGRADE switch is the same as the path in the /OUTPUTFILE switch. This will throw a sharing violation error.
•    The OUTPUTFILE location needs to be on a different drive than the one specified in the DECODEPATH option.
•    DECODEPATH must be specified. The Upgrade option is the same as a "Package Upgrade" or "Opening a Package for Upgrade" in the GUI version. This means the package has to be decoded into the mount\VFS path.