How to use pre-4.6 MSI packages with the App-V 4.6 client

The App-V 4.6 client has been tested extensively with pre-4.6 sequenced packages.

If you have 4.5 RTM packages which use MSI for deployment, then they will have to be updated (4.5 CU1 and SP1 MSIs are not affected by this). There are three ways to update your 4.5 RTM packages: 

  1. Use the MSI transform that we have placed on Microsoft Download Center.
  2. Use App-V 4.5 CU1/SP1 or App-V 4.6 Sequencer to open your package and generate a new MSI 
         a.    Open the package in “Edit a Package” mode on the 4.6 Sequencer
         b.    Select the  Deployment tab
         c.    Check the “Generate Microsoft Windows Installer (MSI) Package” option
         d.    Save package
  3. Use the App-V 4.6 Command-Line (CLI) Sequencer to overwrite your MSI with a new one: SFTSequencer /Open:"package.sprj" /MSI. You can get more information about opening a package in CLI here.

You could also write a batch script to convert multiple MSIs using option 1 and 3.

Examples of batch conversion using Windows PowerShell 2.0:

You could get the Power Shell tool from here.

Option 1: Using the transform
Filename: MsiTran_Apply_Transform.ps1

param (
[string]$root
)
# Pass in the root location where all the *.msi exist

if (-not $root) {
write-error "No root specified"
return 1
}

$files = Get-ChildItem -Path $root -Recurse -Include *.msi
# Recursively search for all *.msi in $root

foreach ($file in $files) {
Write-Host Operating on $file

   $p = Start-Process "\\bin\msitran.exe" -wait -PassThru -argumentlist "-a","\\launchcondition.mst","$($file.FullName)"

   if ($p.ExitCode -ne 0) {
Write-Host "MSItran returned error code $($p.ExitCode) for $($file.FullName)"
}

}

To run: \\MsiTran_Apply_Transform.ps1 C:\msi_test
This will run MsiTran_Apply_Transform.ps1 script with root parameter C:\msi_folder

Option 2: Using the CLI
Filename: Sequencer_Open_msi.ps1

param (
[string]$root
)
# Pass in the root location where all the *.sprj exist

if (-not $root) {
write-error "no root specified"
return 1
}

$files = Get-ChildItem -Path $root -Recurse -Include *.sprj
# Recursively search for all *.sprj in $root

foreach ($file in $files) {
Write-Host Operating on $file
start-process 'C:\Program Files\Microsoft Application Virtualization Sequencer\sftsequencer.exe' -wait -argumentlist "/open:""$($file.FullName)""","/msi"
#Provide full path of sftsequencer.exe

   if ($? -ne "True") {
Write-Host "Error while opening file on Command Line Sequencer"
}
}

To run: .\Sequencer_Open_msi.ps1 C:\sprj_folder
This will run Sequencer_Open_msi.ps1 script with root parameter C:\sprj_folder

Nidhi Doshi
App-V team