Tip: Upgrade App-V Sequenced App Packages Using the Command Line

Follow Our Daily Tips

facebook.com/TechNetTips
twitter.com/TechNetTips
blogs.technet.com/tnmag

The Microsoft Application Virtualization (App-V) Sequencer can be run via the command line. This allows you to automate the sequencing of applications that do not require any special customizations in their guidelines (or recipes) for sequencing. You can also automate upgrading a package using the command line sequencer.

OVERVIEW

1. Open the command prompt on the computer that is running the App-V Sequencer.

2. At the command prompt, specify the location where the App-V Sequencer is installed. For example:
cd C:\Program Files\App-V Sequencer

3. At the command prompt, run the following command:
SFTSequencer /UPGRADE:"pathtosource"
/INSTALLPACKAGE:"pathtoupgrade"
/DECODEPATH:"pathtodecodefolder"
/OUTPUTFILE:"pathtodestination"

In this sample, you need to replace the text in quotes with the following values:

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

When using the command line like this, you can specify additional parameters, depending on the complexity of the application you are upgrading. A complete list of Command-Line Parameters is available here.

BEST PRACTICES

  • 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.
  • 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.
  • The OUTPUTFILE location needs to be on a different drive than the one specified in the DECODEPATH option.
  • 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.

Tip by J.C. Hornbeck, a System Center Knowledge Engineer at Microsoft. Among other duties, J.C. Hornbeck manages a variety of TechNet blogs, including The App-V Blog. Check it out for more information on Microsoft Application Virtualization.

Looking for More Tips?

For more tips on Microsoft products and technologies, visit the TechNet Tips library.