App-V Auto Sequencing Part 3 – Auto Sequence Applications

  1. App-V Auto Sequencing Part 1, the blueprint
  2. App-V Auto Sequencing Part 2 – Preparing the Host and VM
  3. App-V Auto Sequencing Part 3 – Auto Sequence Applications
  4. App-V Auto Sequencing Part 4 – Automate the sequencing process further

In the previous post we prepared our host machine and , now we can start using this configuration to create some App-V packages

The high level process when using the AutoSequencer

First of all you will need a folder structure for execution and creation of the Autosequencer packages. In this example I created a folder AutoSequencer , with 2 subfolders: Installers and Packages

From the SDK that  installed earlier (see previous post here), we copy the sample_config.xml from C:Program Files (x86)Windows Kits10Microsoft Application VirtualizationAutoSequencer to the AutoSequencer folder, and rename it to new.xml

Below, the content of new.xml file.

Important Note , there is a typo in the example xml that needs correcting.
should read 





sample_application_name
c:sample_app
sample_app_installer.exe
/S /p
c:sample_appcustomscripts
30
true
true



new_version_sample_application_name
d:new_version
new_version_app_installer.exe
/quiet
d:UpdateMeold_version.appv
false
true

In the example file, we can see the xml schema as follows

Contain the name of your package.

Contains the full path of the folder containing the installer file(s).

Contains the name of the installer file. This can be an exe ,msi, or a batch file.

Contains the required command line parameters for the installer for example  a silent installation, reboot suppression or others inputs needed for application install.

Contains the duration in minutes taken to sequence and create a package for this application.

Contains a true or false setting that determines if the application is sequenced using the PowerShell cmdlet, or  the Sequencer interface. True for Powershell and False for Sequencing interface.

Contains a true or false setting that determines whether the application should be sequenced or not. True to sequence False to ignore. This is useful when there are multiple applications in a single file and you do not want to sequence them all at once.

Continuing with the example  I am going to sequence two new packages, Remote Desktop Connection Manager and Silverlight.

In the Installers folder created earlier, I've created a folder for each installer. A folder named Silverlight , a folder named RDCman , and a folder named Code .

I've downloaded the latest Silverlight version, Saved the installer to the Silverlight Folder
I've done the same for the RDCman installer.
And last but not least, The Code installer

Now we're ready to modify the new.xml file with the folder names that we have created, the names of the installers, and the other fields

 
 
 
 
Remote Desktop Connection Manager 2.7 
C:AutoSequencingInstallersRDCman 
RDCman 2.7.1512.msi 
/qn 
5 
true 
true 
 
 
Silverlight 
C:AutoSequencingInstallersSilverlight 
Silverlight_x64.exe 
/q 
10 
true 
true 
 
 
Visual Studio Code 
C:AutoSequencingInstallersVisual Studio code 
VisualStudioCode.exe 
/VERYSILENT /MERGETASKS=!runcode 
15 
true 
true 
 

Save the file, and all preparations have been made!

Now we're ready to execute the New-BatchAppVSequencerPackages cmdlet. Get-Help shows us

PS C:> get-help New-BatchAppVSequencerPackages

NAME

New-BatchAppVSequencerPackages

SYNTAX

New-BatchAppVSequencerPackages [-ConfigFile]  [-VMName]  [[-VMCheckpoint] ] [-OutputPath]   []
  • ConfigFile

The path to the xml file. C:AutoSequencernew.xml in my case

The name of the virtual machine that I've prepared in the previous post. I've used AutoSeq as name for the VM

  • -VMCheckpoint (optional)

per default the checkpoint name sequencer-base will be used, but if you've created a different checkpoint, you could specify that here

  • -OutputPath

The location where the resulting App-V package should be copied to. C:AutoSequencierPackages in my example

Start PowerShell with Administrative privileges, and execute the command

New-BatchAppVSequencerPackages -ConfigFile "C:AutoSequencernew.xml" -VMName AutoSEQ -OutputPath "C:AutoSequencerPackage"

The following process will now start off for each application specified in the XML

#

In the event that the appv package isn't created on time, or anything else fails, a checkpoint will be created with the name of the application, the log file for which will be copied to the output folder. This can then later be used for and investigative purposes.

Once all installers have been processed, the packages can be found in the C:AutoSequencerPackages Folder

In the next post we'll automate this process further.

  1. App-V Auto Sequencing Part 1, the blueprint
  2. App-V Auto Sequencing Part 2 – Preparing the Host and VM
  3. App-V Auto Sequencing Part 3 – Auto Sequence Applications
  4. App-V Auto Sequencing Part 4 – Automate the sequencing process further

Ingmar Oosterhoff and Johannes Freundorfer

 

This article was originally published by Microsoft's Core Infrastructure and Security Blog. You can find the original article here.