First published on MSDN on Jul 19, 2018
In the previous post we prepared our host machine and VM, 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 Kits\10\Microsoft Application Virtualization\AutoSequencer 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.
<Name>…</Name> should read <AppName>…</AppName>
<!-- For sequencing a package -->
<!-- For updating a package -->
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 Visual Studio 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 Visual Studio 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
<!-- For sequencing a package -->
<AppName>Remote Desktop Connection Manager 2.7</AppName>
<AppName>Visual Studio Code</AppName>
<InstallerFolder>C:\AutoSequencing\Installers\Visual Studio code</InstallerFolder>
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
New-BatchAppVSequencerPackages [-ConfigFile] <string> [-VMName] <string> [[-VMCheckpoint] <string>] [-OutputPath] <string> [<CommonParameters>]
The path to the xml file. C:\AutoSequencer\new.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
per default the checkpoint name sequencer-base will be used, but if you've created a different checkpoint, you could specify that here
The location where the resulting App-V package should be copied to. C:\AutoSequencier\Packages in my example
Start PowerShell with Administrative privileges, and execute the command
New-BatchAppVSequencerPackages -ConfigFile "C:\AutoSequencer\new.xml" -VMName AutoSEQ -OutputPath "C:\AutoSequencer\Package"
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 troubleshooting and investigative purposes.
Once all installers have been processed, the packages can be found in the C:\AutoSequencer\Packages Folder
In the next post we'll automate this process further.
Ingmar Oosterhoff and Johannes Freundorfer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.