Ensuring Application Compatibility in Vistaby Mitch Tulloch
In a previous article, I discussed the current state of User Account Control (UAC) in Windows Vista and how this feature impacts both enterprise and home users. Although UAC is still somewhat in flux as this article is being written, enough of its issues have been addressed for third-party application developers to get serious about developing "Made for Vista" versions of their applications. Unfortunately, if the past is any indication of the future, some vendors will not make the effort to do this or to enable such "legacy" applications to run on Vista and interact with UAC properly. Microsoft offers various ways to "bend the rules" and make those pesky old apps run properly under Vista. This article, my latest in a series about Vista for WindowsDevCenter, will focus on this very topic--application compatibility on the Vista platform. Specifically, what should you do if your enterprise has mission-critical line-of-business apps that simply must continue running properly once you've upgraded your desktops to Vista?
The Easy Way
The easiest way of dealing with applications that have Vista compatibility issues is simply not to run them on Vista. If you have only a few apps like this and only a small number of users who need to run them, those users' computers could continue running a pre-Vista version of Windows. Alternatively, you could configure these users' computers to dual-boot between Vista and your current desktop version of Windows. Of course, dual-booting means that if a user needs to run a legacy app, he must shut down his current Vista desktop and start his legacy version of Windows, but if the legacy app won't be integrated with any other apps and is run only occasionally, this approach could work.
A more elegant solution is to use virtualization, i.e., run the legacy version of Windows in a virtual machine on your Vista desktop. One way of doing this is to install Microsoft Virtual PC on your Vista desktop, create a new virtual machine, and install both your current version of Windows and your legacy application in it. When you need to run the legacy app, start Virtual PC, start the VM, and launch the app. When you're finished running the app, you can save the current state of your virtual machine for faster access the next time you need it. If you have more than one legacy app to virtualize, you could either install them all on the same virtual machine or create a separate virtual machine for each.
The news is even better if you're an enterprise customer that has a Software Assurance (SA) agreement with Microsoft, or if you will be deploying Windows Vista Enterprise on your desktop (see here for information concerning the different versions of Vista). That's because Vista Enterprise will include a new feature called Virtual PC Express, which is essentially a stripped-down version of Virtual PC that allows users to run only one virtual machine at a time. Because SA customers are allowed to run two copies of an operating system, you could run Vista on your desktop and Windows XP within a VM at the same time, with no extra licenses required. In fact, the idea of solving legacy application compatibility issues using virtualization is so popular that Microsoft is providing its SA customers with a downloadable version of VPC Express that can run on both Windows XP Professional and Windows 2000 Professional. This means that if you are an SA customer, and you have XP deployed on your desktops but need to run a legacy app that doesn't work properly on XP, you can download VPC Express (currently only in early-release form) from Microsoft Volume Licensing Services (MVLS), install it on your XP machines, and use it to run one VM of an earlier version of Windows, all without having to purchase additional licenses.
Think about it for a moment. Using virtualization in this way means no more dual-booting, no more tweaking application compatibility settings, no more installing and deploying application compatibility shims, and no more yelling at vendors for not upgrading their applications so that they work properly under the latest version of Windows. I don't think Microsoft really knew what they were getting into when they allowed virtualization into their fold by acquiring Connectix technology back in 2003. That is, I don't think anyone had any idea how popular virtualization would be as an easy solution to application compatibility issues. But it was a smart move on Microsoft's part, because a major reason many enterprises delay desktop upgrades is their fear of application compatibility issues. Well, fear no more--any apps that won't run well under Vista can still be run on Vista using VPC Express within a VM in which you've installed your current version of Windows.
Get Your ACT Together
Of course, you could call VPC Express a kind of kludge since it really only works around the problem rather than solving it. So, let's look briefly at ways you can try to run legacy apps properly under Vista. First, the Compatibility tab introduced in Windows XP still appears when you right-click on an executable in Explorer and select Properties (Figure 1):
Figure 1: Configuring compatibility settings for legacy apps
What has improved, though, is the Program Compatibility Assistant (PCA). When you attempt to run an application in Vista, the PCA tries to automatically determine the compatibility mode settings the program needs to run properly, and it will either simply configure compatibility settings appropriately or prompt you for some kind of response.
Another change in Vista relating to application compatibility is the use of file system and registry virtualization. Legacy apps often fail to run properly because they try to write to protected areas of the file system (such as %ProgramFiles%) or restricted portions of the registry (such as the SOFTWARE hive). Normally, you need administrator credentials to write to these areas, so administrators often must make domain users members of the local Administrators group on their desktop computers for third-party applications to install and run properly. Vista sidesteps this issue by enabling applications under certain conditions to write to corresponding per-user virtual areas of the file system and registry. In other words, file system and registry virtualization is designed to avoid some of the problems that arise when non-admins try to install and run applications on their computers. According to Microsoft, however, future versions of Windows might not support file system and registry virtualization, which means that you shouldn't depend on it as the only means of making your legacy apps run.
Taking it to the next level, you can try to resolve compatibility issues by using Microsoft's Application Compatibility Toolkit (ACT), a set of tools for creating shims that mark applications with the appropriate run level for the parent process launching the application (for example, a standard user, a Protected Administrator (PA), or the built-in Administrator account). ACT is currently being updated to version 5.0, which will be useful in Vista enterprise environments that deploy applications using Group Policy's Software Installation feature. This whitepaper on Microsoft TechNet provides a good walkthrough on this subject.
Finally, you can tell your developers (or vendors) that they absolutely must provide you with made-for-Vista versions of their software so you can ditch the legacy versions. They'll rant and complain and probably say "How do we do this?" but you can point them to MSDN, where there's plenty of information already available on the subject; a good starting point is here.
Return to the Windows DevCenter.