Should you migrate test applications to Windows Vista?
Michael Neal, National Instruments -- Test & Measurement World, 4/5/2007 11:47:00 AM
Windows Vista is here, and almost every new PC comes with it. It’s an abrupt change from Windows XP, bringing sweeping changes much in the way Windows 95 did to prior versions. Just like Windows 95 started the migration from 16 bit to 32 bit, Vista starts the transition to 64 bit. But this time, you have a choice of a 32-bit version or a 64-bit version. Furthermore, new security enhancements may also hinder the transition to Vista. You should, therefore, understand the issues you face in migrating your test and measurement applications, and most importantly, your GPIB and VISA drivers.
Security may seem like a peripheral topic for test engineers, but Vista’s new security model is so pervasive throughout the operating system that it fundamentally alters how applications function. Microsoft has recommended that all users, with the exception of administrators, have standard user access to their PCs. But that was nearly impossible for instrumentation applications that need access to drivers and hardware and need unfettered access to the file system and registry. Thus, most test applications ran with users logged in as administrators.
In Windows Vista, Microsoft introduced a security model called User Account Control (UAC). Under UAC, all Windows Vista users and their applications run as standard users most of the time. When you require administrative rights, such as for installing new software or changing your security settings, Windows Vista prompts you to supply consent, after which you are temporarily elevated to complete that single task.
Under UAC, Windows Vista restricts portions of the Windows file system and registry. UAC also restricts write operations during normal operation (i.e., standard user mode). For example, applications no longer have unlimited access to C:Program Files and C:Windows, which has considerable ramifications because most software created for Windows today expects unfettered access to all directories.
To accommodate existing software for Windows that writes to protected file directories, Microsoft provides a backward compatibility technology known as virtualization (not to be confused with the identically named technology for the simulation of virtual machines). While virtualization enables older applications to run without programmer intervention, it does not guarantee correct behavior, and many applications will need to be updated to comply with UAC restrictions.
![]() |
|
Figure 1. Virtualization helps protect various parts of the file system and registry while maintaining compatibility with legacy software. |
Don’t depend on virtualization
Although most legacy applications created for previous versions of Windows will run because of virtualization, it is not an ideal solution and only intended to serve as a short-term workaround. Because virtualization isolates files in per-user locations, it can lead to undesirable and seemingly bizarre behavior, especially on computers shared by multiple users. Consider, for example, a test application created for Windows XP that performs quality assurance on products at the end of a manufacturing line. Like many existing applications, this software writes test data to a location in the Program Files directory:
C:Program FilesMyApplicationTest Data
Under Windows Vista, virtualization could affect the behavior of the application. If you run the application on this machine using your standard user profile, Windows Vista automatically detects that you don’t have permission to access that location and redirects the data to the following location:
C:Users<USER Profile>AppDataLocalVirtualStoreProgram Files MyApplicationTest Data
Subsequent write and read operations performed under this user profile will always use the copy located in the VirtualStore. But, the application will continue to believe that it’s accessing the Program Files directory. If a second operator logs into this computer under his or her profile, he or she won’t have access to the previously saved data because it’s not shared across user profiles.
While an administrator can forcibly disable virtualization in Windows Vista, Microsoft has vowed to remove it in a subsequent version of Windows. To ensure that software behaves as expected under all use cases in Windows Vista and beyond, you must update test systems so that writable files no longer appear in virtualized directories. In many cases, software rewrites may be minimal, but compliance with UAC restrictions could entail major architectural changes, depending on the application.
The 64-bit version
All four versions of Windows Vista—Home basic, Home Premium, Business, and Ultimate—are available in both 32-bit and 64-bit versions, with the latter designed for PCs with one or more 64-bit processors. Known as Windows Vista x64 Edition, a 64-bit version isn’t entirely revolutionary because there was a rarely used 64-bit version of Windows XP. Informed decisions on whether to use the 64-bit edition require a clear understanding of the differences between the two versions and the potential impact on your applications.
A 64-bit operating system is a logical step in the evolution of the PC, but you should understand why. Often, a computer’s maximum physical memory is less than the amount needed for all running programs, especially when multiple processes or applications execute simultaneously. Programs provide a solution by storing some of their data on the hard drive and copying it back and forth to physical memory as needed.
Until recently, almost all consumer PCs used a 32-bit processor, which provides 232 bytes, or approximately 4 Gbytes, of virtual memory. For many years, 4 Gbytes of virtual memory was enough for most programs. Today, however, Windows computers increasingly confront the 4 Gbytes virtual-memory ceiling. In response, Intel and AMD developed consumer-grade 64-bit processors.
A 64-bit processor can, in theory, access 264 memory locations. That’s 16 exabytes of virtual memory, which is far more than 4 Gbytes. To take advantage of the larger memory addresses in 64-bit processors, you need a 64-bit operating system such as Windows Vista x64 Edition. Windows Vista x64 Edition imposes a more practical 16 Tbyte limit on address space.
Running 32-bit applications in Windows Vista x64 Edition gives each application 4 Gytes of dedicated virtual memory space, isolating it from other applications running concurrently. That separation may result in some performance increases. The larger memory space allows more processes to simultaneously reside in physical memory, which could eliminate or reduce time spent loading and switching processes' RAM and virtual memory. To realize the potential benefits of a 64-bit operating system like Windows Vista x64 Edition, you need at least 4 Gbytes of RAM.
You don’t need 64 bits
In most cases, you won’t need Windows Vista x64 Edition. Most scientific and engineering applications won’t immediately benefit from using it. The following types of applications may see performance benefits with Windows Vista x64 Edition. These applications include:
§Applications that require mathematical precision and floating-point performance such as simulation.
§Applications that involve large, high-performance databases.
§Vision acquisition and analysis applications with large amounts of data moving directly into memory at rapid rates. Currently, the limitation is 2 Gbytes (on a 32-bit computer). The ceiling is much higher on a 64-bit system, even when you take into account that no one can have terabytes of memory.
While Windows Vista x64 Edition makes working with huge data sets in areas such as digital video, scientific computing, and large databases easier, most applications won’t see any benefits in performance. A 64-bit processor, not inherently faster than its 32-bit counterparts, simply has the added ability to access more memory. In fact, because Windows Vista requires more resources than its predecessors, existing computers upgraded to Windows Vista are just as likely to see a performance decrease.
Migrating existing test and measurement applications to Windows Vista
At some point, you’ll have to decide if and when to migrate an existing test or measurement system to Windows Vista. The important compatibility issues are: will your software and drivers work (install and run without throwing errors) and will the software and drivers work as expected?
First, not all software and hardware vendors plan to immediately update their products and may instead opt to depend on backward compatibility technologies such as virtualization. Because the black-box nature of software makes it nearly impossible to discern how it really works, your overall test or measurement solution could end up relying on a mix of virtualized and nonvirtualized components, which interjects more uncertainty into the stability and overall reliability of your system. You should check with your software suppliers to ensure that both application software and device drivers have been properly tested with Windows Vista.
You may be able to recompile your 32-bit applications into 64-bit software for Windows Vista x64 Edition. This is not a requirement to get your current applications to work on Windows Vista because it includes a subsystem that accommodates the loading, execution, and management of 32-bit apps called Windows-32-on-Windows-64 (WOW64).WOW64 creates a 32-bit environment that lets 32-bit Windows applications run unmodified in a 64-bit system. No emulation is needed to run existing 32-bit applications for Windows on the 64-bit version of Windows Vista, but 16-bit applications, which run on 32-bit Windows due to WOW32, won’t run under WOW64. Legacy 16-bit applications will continue to run without incident on the 32-bit version of Windows Vista under WOW32.
While Windows Vista x64 Edition can run 32-bit applications and utilities with ease, it won’t run kernel-level device drivers, such as those for GPIB, Virtual Instrument Software Architecture (VISA), and data acquisition. You must have 64-bit drivers, even for 32-bit applications running via the WOW64 environment. This may be an issue for legacy hardware for which no 64-bit drivers are available, and for which the hardware vendor is unwilling or unable to provide an updated driver. Before moving to Windows Vista x64 Edition, you should confirm that the device drivers you are using have been released in 64-bit versions. Many test and measurement software providers will release new versions of existing device drivers specifically to provide support for Windows Vista.
Table 1. Application software and driver compatibility with Windows Vista.
|
Supported on Vista x32 |
Supported on Vista x64 |
|
|
16-bit applications |
Yes |
No |
|
16-bit drivers |
No |
No |
|
32-bit applications |
Yes |
Yes |
|
32-bit drivers |
Yes |
No |
VB6 will run on Vista
You may have heard that Windows Vista won’t support Visual Basic 6.0 and that previously built DLLs will no longer function correctly. Rest assured, Microsoft still plans to support Visual Basic throughout the full lifetime of Windows Vista, which is five years of mainstream support followed by five years of extended support. Windows Vista, comes with key Visual Basic 6.0 run-time files as part of the operating system, you should still include the VB6 run-time engine with any VB6 executables.
Calling external code may also be an issue when considering Windows Vista x64 Edition. If your 32-bit application currently loads and calls a 32-bit DLL, you will need a 64-bit replacement before you can successfully recompile and run your application as 64-bit software.
Once you’re confident at least one version of Windows Vista will support your existing applications, you may want to adapt to the restrictions imposed by UAC, which entails adhering to Microsoft guidance on the correct locations to store data. You can use the C:UsersPublicDocuments director to place files that users without administrator privileges can use.
In this directory, you should store files that you want to be visible to anyone using the computer. Files stored in this location can be viewed though the Windows Explorer, and changes implemented by one user will be seen by all other users. This directory replaces C:Documents and SettingsAll UsersDocuments on Windows XP.
When you want files accessible to one user only, use the C:Users<USER>Documents
directory. You can use this directory to save per-user information. It replaces C:Documents and Settings<USER>My Documents in Windows XP.
In the end, formal testing is the best way to ensure that your transition to Windows Vista from your current operating system will be successful. Many companies are developing pilot programs with specific guidelines for evaluating both the 32- and 64-bit versions of Windows Vista; such pilot programs ensure that any possible transition problems are identified early and system dependencies can be addressed.
is a product marketing manager for National Instruments LabView. He currently helps market LabView PDA and localized versions of NI LabView. Neal joined NI in January 2003, and holds a bachelor of science in structural engineering and Master of Science in biomedical engineering from The University of Texas at Austin.
Michael Neal



















