Microsoft Application Virtualization Advanced Guide
上QQ阅读APP看书,第一时间看更新

Reviewing complex applications

Understanding applications is a key element prior to starting with the sequencing process. Gaining deep knowledge about it will give us the necessary tools for proper sequencing, especially when we are dealing with complex applications.

In my previous book, Getting Started with Microsoft Application Virtualization, we took a closer look at the step-by-step process for virtualizing a seriously complex application such as Microsoft Office 2010. Even though we are not going to review it again, we'll talk about the important topics we must understand to achieve a happy ending while virtualizing a complex application.

Another important thing to remember about the applications and their sequencing process is that we should always maintain this process with the recommended best practices; this way we'll avoid common errors and misconceptions regarding this stage.

Applications that require complex sequencing

If you have a bit of experience in App-V and in the sequencing process, you probably know that almost any application is suited for virtualization; however, every application is unique in how it interacts with the operating system or other applications, and the requirements included.

Here's a list of application types that require a complex capturing process:

  • Applications with device drivers: As mentioned earlier, drivers are not suited for sequencing, but there are methods we can use to deploy these drivers manually or by automation (OSD or any other scripting process), to make those applications work smoothly.
  • Applications with non-virtualized extensibility points: Good examples of those are applications with shell extensions, such as WinRAR. Also, by adding some parameters and changes to the packaging process, we can make most of them work properly.
  • Applications that cannot be installed on Q drive: App-V supports these installations, since the virtual environment redirects the paths to the right directory; but there are some tweaks that might be necessary.
  • Applications with dependencies outside the virtual environment: Some applications can contain particular and custom configurations that require, for example, paths outside their virtual environment. Depending on the application, we can solve this in different ways, such as, editing the sequencer exclusions list; using merge or override options within the package directories to edit the virtual application environment.
  • Web applications: Internet Explorer does not support sequencing, but some web applications, such as Java Runtime Environment or Silverlight, can be captured. In these cases, we must guarantee that App-V can execute an instance of Internet Explorer correctly, in order to use these web apps.
  • Applications not compatible with the operating system: As we said, we should not focus on using our App-V implementation to solve an incompatibility issue. But, if we find ourselves facing a compatibility problem, an efficient approach could be to understand exactly what went wrong in the configuration for it to be incompatible.

    For those scenarios, Microsoft Application Toolkit and deploying a "mitigation", by script or manually, can be very useful.

About the Microsoft Application Compatibility Toolkit

One interesting tool we can use to complement App-V implementation is the Microsoft Application Compatibility Toolkit. This tool generates a complete analysis about the application we choose and verifies whether it is compatible with the Windows Vista and Windows 7 operating systems.

Not only we can save a lot of time by letting the Microsoft Application Toolkit find the incompatibility issues within the application and the operating system, but we can also use it to generate mitigations to solve the incompatibilities.

These mitigations can also be used as shim files (.sdb) that contain the actions that can solve these incompatibilities. By importing this shim into the operating system, the virtual package can interact with the operating system because of this new mitigation implemented.

As the application compatibility shim engine is an operating system feature that changes API behavior, these .sdb files must be installed outside of the virtual environment. This means that you must install the application compatibility fix(es) before sequencing, and then sequence the application, as you normally would. When it is time to deploy the application, you must install the shim database via a pre-launch script in the OSD or as a dependent SCCM advertisement. The installation requires administrator rights and the command line will look much like this:

sdbinst.exe -u C:\ApplicationFix.sdb

This, again, is no "silver bullet" to the real problem of incompatible applications. Consider this as a workaround but it is not guaranteed that it will solve the problem.

You can download the Microsoft Application Compatibility Toolkit from the Microsoft Download Center website http://www.microsoft.com/download/en/details.aspx?id=7352.

In the same link, you'll also find the Step-by-Step Guide and Deployment Guide.

Understanding sequencing phases

Before we start working with the complex sequencing process, let's take a look at the sequencing phases included in App-V, which will facilitate our job while capturing.

When we are sequencing an application, as soon as the installation monitoring ends, the application goes through the following three phases:

  • Parsing: Here's where the application becomes "portable" by removing all explicit names related to the computer or user name and transforming those into environment variables. For example, appv-sequencer (computer name) is replaced by %COMPUTERNAME, or C:\Users\augusto transforms into %USERPROFILE%.
  • Excluding: In the excluding phase, selected directories are removed from the captured data, such as, the IE cache directory or recycle bin. Those are excluded not only to avoid any unnecessary data included in the package, but also because some of the directories are related to computer-/user-specific data, which must be avoided.
  • Classifying: Depending on the category type, the data is classified and saved on a different PKG file; this is an important matter since this category will decide whether these components are shared with other virtual applications (application data) or not (user data).

Here's a figure about the phases interacting in the sequencing process:

Understanding sequencing phases