Tim Mangan recently posted a great blog series to help you get started with App-V 5.x, one of these posts covers sequencing: https://www.tmurgent.com/TmBlog/?p=2501. He covers theory, tools and his own practices. Check that post out! I created this document a couple of months ago for the organization I’m working for, so I figured I’d also share my own!
Sequencing Environment
First off, you will want to do all of your sequencing on a virtual machine(s). There’s several tools out there, which you can use for building and running these VMs. My personal preference is to use VMware Workstation. I strongly suggest that you do not use vSphere. The reason for this is because these VMs are typically open to being messed with by admins. You may lose snapshots or even entire VMs. I also prefer to keep my sequencing machines local, so I manage the local machine and the VM, I am the master of my own domain :). Oracle VirtualBox is also a good bet. In newer versions of Windows, you could also use Hyper-V, if preferred.
In my environment, every App-V sequencing VM contains all relevant Visual C++ Redistributables* and the App-V Sequencer. I create a custom template (Download from GitHub Here) and store it under C:\App-V. Using this template ensures the cleanest package possible.
My Sequencing VM has three snapshots. One baseline clean snapshot without the App-V Sequencer (incase I ever need to go back to the start), a snapshot with Office installed and a snapshot without Office. In most cases the snapshot without Office will be used. If an application installs an Office add-in, you should sequence with the Office Snapshot. Preferably these VMs are not domain joined but if domain joined is a requirement, that’s usually fine, you just need to ensure you update the template with any relevant environment specific noise e.g. anti-virus, agents. You may also need to disable services which may be interrupt the sequence.
At a minimum, on my clean VM, I stop and disable the Windows Defender, Windows Search, Offline Files, Security Center, Diagnostic Policy Service and Windows Update services to ensure our packages don’t include files or registry touched by those services.
Note: *In App-V 5.x when Visual C++ Redistributables are detected as an application dependency, App-V will process that and dynamically deliver Visual C++ to the client machine when the App-V package is being added. This can create performance issues, I opt to install all Visual C++ Redistributables on all client machines.
The App-V Sequencer should then be configured to disable the option to Package pre-installed VC runtime dependencies and side-by-side assemblies.
When the setup is complete save the snapshot(s) with the VM in a shutdown state. The snapshot has been taken with the VM shutdown to prevent GUID duplication.
Start Sequencing
Always revert the VM snapshot before sequencing. You will need to Power on the VM.
Before you begin, it’s worth checking out the community App-V recipe list to see if somebody else has sequenced the application before and decided to share the steps required.
Navigate to Start Menu–>Microsoft Application Virtualization Sequencer. Launch Microsoft Application Virtualization Sequencer.
When launched, navigate to File–>Load Template…
Select the template and click Open.
When prompted, click OK.
Note: Unfortunately, you will need to do this during every sequence. The way the template is applied has changed in 5.x.
Click Create a New Virtual Application Package.
Click Next >.
Click Next>.
This dialog presents the results of a quick diagnostics check of the sequencing machine. It will report any possible issues before sequencing begins. e.g. An application is currently running, the Windows Search or Windows Defender services are running etc.
Accept the default. Click Next>.
This option is a little redundant because you can always just select Standard Application and simply create a shortcut pointing to the local dependent application or if the application is virtual, create a Connection Group\Virtual Environment in the App-V Management Console or SCCM as required.
Select Perform a custom installation and click Next>.
I always select this option, it’s more flexible than the option to just launch the install automatically and monitor. Usually, I’ll want to launch our application during sequencing. I may also want to change File Type Association, disable AutoUpdates or make some other type of configuration changes after the install has completed.
Enter a Virtual Application Package Name that meets your company naming standards. Click Next>.
When prompted by this dialog, we can minimize the sequencer and launch the application install.
Go through the install of the application.
Launch the application and then close it.
Note: In some cases, it’s not a good idea to launch the application due to some unique user settings or first run configurations made. Following best practice, launch the application. If you encounter an issue when testing, try again without launching the application.
If the application set File Type Associations and you do not wish to include these in the App-V package, now is a good time to remove those FTA’s.
Note: If the application prompts you to restart the machine, Select NO or Cancel, instead you should manually restart the machine using Start–>Restart or open cmd and run shutdown -r -t 3
Similarly, if the application installed any services and you wish to modify the service settings, do so now.
Click I am finished installing. Click Next>.
Click Next>.
Click Next>.
Issues may be identified and presented in this screen. Example of Issues include:
- Application contains drivers
- Application contains DCOM
- Application contains COM+
When an issue is identified, review the Decision Matrix and accompanying limitation posts. Keep in mind this matrix does not account for persistent vs non-persistent systems. Extracting drivers, COM+ component service etc. and scripting the install as part of the App-V package can create performance issues on a non-persistent system.
Click Stop now. Create a basic virtual application package (default).
Click Next>.
The customize option gives the ability to optimize the streaming performance by capturing a Feature Block. Performance reports suggest the greatest performance results are from using fault streaming. (Not optimizing)
Click Continue to modify package without saving using the package editor.
Click Next>.
The Files excluded from package warning will appear more often than not. Double click on the warning to review the files excluded from the package.
Temporary install files and some user profile files are usually acceptable to exclude, however, in certain cases these files may be required as part of the package to function. In which case, you will need to identify the directory and remove it from the exclusion list under Options in the Sequencer.
Review and click Close.
Click Close.
Enter a Description.
Enter SEQUENCED_BY=<Sequencer’s name>.
e.g. SEQUENCED_BY=Rory Monaghan
Do not modify the Operating Systems in Deployment.
This will ensure the application can work on any operating system with the App-V client installed.
Note: If, after testing an application is found to not work on a certain OS and we still wish to deploy, I must select only the Operating Systems that the application will work on.
Navigate to the Windows\Installer directory (If it exists), delete any .msi, .msp or .mst file found. DO NOT delete the entire Windows\install folder.
At this point, review the other files and folders in Package Files, if you find files that can be removed like cached installers, ensure these are deleted to remove bloat from the package.
Navigate to the Virtual Registry tab.
On the REGISTRY parent directory, right click and click Find…
Search all Keys, Values and Data for your username, sequencing VM hostname, UNC paths (if you installed from a UNC path or interacting with a fileshare), server names (if you interacted with any servers) and drives e.g. C:\, T:\ etc. I\You want to make sure hardcoded paths are avoided wherever possible.
Ensure the Allow virtual application full write permissions to the virtual file system is always checked. This should be checked automatically if using the template that I provided on GitHub.
Allow all named objects to interact with the local system and Allow all COM objects to interact with the local system should be unchecked by default. If one identifies that the application requires COM objects and named objects to function, these boxes will need to be checked. If in doubt, test the application without these checked, if there’s an issue update the application and check these boxes.
Using a tool such AppDNA, ChangeBase or Flexera Application Manager can help identify application which may require these settings. However, in many cases we do not have these tools at our disposal.
Navigate to Shortcuts and FTAs and review the shortcuts. Typically, I will leave the default shortcut. However, you should check the shortcuts to make sure there are no shortcuts placed in the Startup folder. If an application requires to run at Startup this should be tested in all environment to ensure performance is satisfactory.
Navigate to File and click Save As New Package…
Using Save As… is also fine, however I suggest using save as new package to ensure new GUIDs are always created just in case the sequencing VM was not in a pristine state.
Save the package into a standard directory. You can save it to your desktop and then copy it to the content share OR you can save it right to the content share. If you save it to the desktop, ensure you copy your completed package to the share BEFORE reverting your VM.
Example of a standard folder structure is:
Content\Vendor\Application\Version
e.g.
Content\InstEdit\InstEd\1.5.15.26
If sequencing both a 32-bit and 64-bit version of the application, also include a BitCode folder to differentiate.
Content\Vendor\Application\Version\BitCode
e.g.
Content\InstEdit\InstEd\1.5.15.26\x86
Content\InstEdit\InstEd\1.5.15.26\x64
To read about some other great tools that may help you with your sequencing efforts, check out: https://www.tmurgent.com/TmBlog/?p=2501