Managing Shims in an Enterprise
When addressing application compatibility issues in preparation for a deployment of Windows, among the most flexible and powerful tools available are application compatibility fixes, commonly called shims. However, many organizations do not leverage shims to the extent that they could, either because they don’t understand the underlying technology or because they do not have a process in place to manage shims over the remaining lifetime of the applications they are used to remediate.
How shims work
Application compatibility in Microsoft Windows operating systems is one of the fundamental pillars of its development, alongside performance, reliability, and manageability. To reduce deployment costs and accelerate adoption, Microsoft invests in deep technical solutions to ensure broad compatibility of existing software, driving compatibility into the engineering and release process.
Design implications for the shim infrastructure
You may find certain consequences of the Shim Infrastructure design relevant when determining your shim strategy.
Deciding When to Use Shims as a Compatibility Mitigation
When Microsoft consultants work with customers on using shims to resolve compatibility issues with Windows, they begin the conversation with an overview of how shims work, ensuring that people at various levels in the organization understand the technical implications of using shims for mitigations. However, the decision is more than a technical one.
Scenarios in which customers decide to use shims
The scenarios in which Microsoft consultants have assisted customers in using shims to mitigate application issues include:
In general, Microsoft consultants have found that good communication and collaboration among technology owners (“do the shims succeed in making the application sufficiently compatible”) and business owners (“can I accept the support terms of using a shimmed version of this incompatible application”) helps the decision process.
Deciding which versions of an application to shim
While a thorough description of applying a shim to a particular application is outside the scope of this white paper, one aspect that is important to note is that shims can be applied to particular versions of applications, either as “up to or including” or just a particular version. Either one ensures that the next version of the application that is released will no longer have the shim applied.
Support for shims
While support policies for applications made compatible with Windows using shims is up to each software vendor, another frequent question is, how is the code for the shims themselves supported?
Custom Shim Database Management Strategies
If you have decided to use shims as part of your application compatibility mitigation strategy (for certain classifications of applications), the next question is, which strategy should you employ for managing custom shim databases? The customers Microsoft consultants have worked with have tended to select one of two approaches to managing their custom shim databases: deploying fixes as part of the application package or managing a centralized custom shim database.
Deploying fixes as part of an application package
One strategy for deploying application fixes is to include the custom shim database—containing a single entry for the application the package is installing—directly into the installation package. During the early phases of compatibility testing, this can seem like the easiest approach. However, over time this approach can grow more complex. Microsoft consultants recommend evaluating the following considerations prior to selecting this approach.
Managing a centralized custom shim database
An alternate strategy most customers consider (and most end up using) is to manage either a single custom shim database or several custom shim databases for large subsets of the organization. Doing so makes it easier to enforce policy and provide consistent updates to application mitigations you discover that you need to support your migration to Windows 7. Microsoft consultants recommend evaluating the following considerations prior to selecting this approach.
Merging Custom Shim Databases
Customers who have selected a centralized custom shim database approach benefit from the improved performance of searching a single database to determine whether Windows should apply a shim to a particular executable file. A frequent question Microsoft consultants receive is how to merge custom shim databases to create a single custom shim database. Customers have generally taken the following approach:
Custom Shim Database Deployment
Deploying a custom shim database to users requires the following two actions:
While any approach that completes these two actions will work, customers commonly use one of the following two approaches:
Note that you must ensure that the installation of the custom shim database executes with administrative rights.
Initial deployment and updates
Because testing and mitigation of application compatibility issues typically happens prior to the deployment of a new version of Windows, a common approach is to include the custom shim database containing all known issues at the time of deployment with the corporate image. Then, as you need to update your custom shim database, you could provide these updates using one of the mechanisms described above. This is the methodology that Microsoft uses to manage the System shim database. The initial version was released with the Release to Manufacturing (RTM) version of Windows, and updates are provided with Windows Update. When you use this approach, you are using a methodology proven at a very large scale.
Shims are a powerful tool for mitigating application compatibility issues and moving forward with your Windows 7 deployment. However, understanding when to shim and how to manage shims within an organization can be a challenge.
About the Author
Chris Jackson, aka "The App Compat Guy," is a Principal Consultant and the Technical Lead of the Windows Application Experience SWAT Team. A widely recognized expert in the field of Windows application compatibility, Chris has created technical documentation, training, and service offerings used inside and outside of Microsoft based on years of real-world experience with enterprise customers and independent software vendors.