App-V 5.0 Templates

By Rory Monaghan

SHARE

In older versions of the App-V sequencer you could setup a template using the default.sprj file, which was a great way of enforcing certain standards, I posted a blog post about this last year. You can read about it HERE .Before going into the Templates I should explain that although similar, I am not describing Package Accelerators which are like application specific templates, Package Accelerators can also contain more than just a template, it can be accompanied with other useful data or information in regards to packaging an application, which is amazing when you are sequencing applications as somebody else has done the hard work for you. For an example of these Accelerators take a look at the Technet site which is HERE

There was also an option in the later versions of 4.x which allowed you to create a template, save it and then point your sequencer to use that template. In App-V 5.0, Microsoft got rid of the .sprj file format and also those template methods.You can no longer point to a template file, but you can create a template which you can load if desired. You will see the Template Save and Load option under File.

Templates1

First you should actually create your template. To do this you open your sequencer, browse to Tools and then click on Options.

Templates2

 

You are going into Options as this is where you can modify the options which you can save into your template. The above dialog shows exactly what can be saved, General Options and Exclusion Items. The default tab which appears when you open options is the General Options as mentioned above.

Templates3

 

In the above example you can see an option to Package Pre-installed VC runtime dependencies which is a feature new to App-V 5.0 SP2 which as of this post is in beta. For a full description take a look at Nickes post HERE The other options here which you can modify for your template is the scratch location which is like a specific temporary working directory for the App-V Sequencer. You can allow Windows Updates to be captured during the sequence, it’s Best Practice to disable Windows Updates as it creates noise, meaning files or registry which get modified or added by a Windows Update that are not related to your application that you are sequencing. I guess an option you may want to allow it, is when you have a certain Microsoft application which you want to install during the sequence and then install a Windows Update(s) for the app. There’s an option to append the filename for each time you save the application, it’s not really relevant any more but I like to leave it checked so I can see which iteration of the app I am working on as I document this. Always trust the source of Package Accelerators is an option to allow the use of any and all package accelerators, why this is relevant is because you can download Accelerators created by the Online App-V Community.

Templates4

 

The Exclusion items is a big one which you will certainly want to give some attention to. Microsofts default exclusion items are quite good. If you run the Sequencer on a vanilla Windows machine the settings are likely to be good for your sequencing. The Exclusion items lists the Directories and Registry hives which get ignored by the Sequencer, so any changes to these directories do not get included into your virtual applications, the identified directories are selected because they routinely receive changes that are unique to a user which you obviously don’t want saved to your application (in most cases) that is because files or registry unique to you will likely not work for the next user. These files or registry that are unique to a user also tend to get re-created if they do not exist when the application is run. You should note, if you are using a VM on your domain and it receives Group Policies or if you have your companies applications or any services configured to run on the Virtual Machine then the out of the box Exclusion items, likely will not be good enough. So how do you know what you need to exclude for your environment?

Well firstly leave the sequencer settings as is. Then you should start up your VM, carry out a sequence but do not install anything and allow the sequencer run for some time. When you complete the sequence you can view the registry and files and folders which the sequencer picked up on being changed. You can then take a note of these directories and then revert your VM to a clean state, start up the sequencer and modify the Exclusion items to include all of the directories you picked up on. You may want to do this numerous times as a catch all effort. If your VMs are being centrally managed you should be aware that changes might mean you need to refine these Exclusion Items over time.

Another important note. You may notice when you attempt to sequence certain applications that they do not work and then upon reviewing the report.xml file which was outputted with your virtual application you may notice a bunch of application specific directories got excluded. Examples of these types of application may be Microsofts Sky Drive and Google Chrome which do not install the Industry standard directory of ProgramFiles. These applications install the AppData\Local location which by default is excluded and should be excluded. You will just need to be aware of this as in some cases, before you sequence an application like Chrome, you will need to modify the exclusion items.

MSI Template

You will notice after you install the sequencer, within the Installation Directory under the path C:\Program Files\Microsoft Application Virtualization\Sequencer\en-US there is an MSI file called PackageMSITemplate. You can actually take this MSI, open it with your favorite MSI editor and set this up to be a template to meet your company standards. This is only relevant if you intend to use the generated MSI to deploy your application, or if, for some reason you use the MSI file as a means of archaic record keeping 🙂 An example of what you may standardize in this MSI is to set a Launch Condition to ensure the application does not install on any unauthorized devices, you may set certain MSI properties unique to your company, you may create a custom action which does something to each user machine on install or uninstall. A common standard for companies is to create a registry branding for each application when it installs and uninstalls on a users machine, so you could set that in this MSI to ensure your App-V applications also adhere to that standard.

Let's make virtualization easier!

Be amongst the first to know when I publish new reviews, guides and tools to simplify your projects.

By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.

We'll virtualise your 5 most complex apps for FREE