Article ID: 950407 - Last Review: April 16, 2008 - Revision: 1.4 The %ProgramFiles% registry value that a 32-bit application is writes is automatically changed to %ProgramFiles(x86)% on a computer that is running a 64-bit version of Windows VistaOn This PageSYMPTOMSWhen a 32-bit application is writing the %ProgramFiles% registry value on a computer that is running a 64-bit version of Windows Vista, Windows Vista automatically changes this string to %ProgramFiles(x86)%. This behavior cannot be changed. This behavior also occurs in the 64-bit versions of Windows Server 2003 and of Windows XP. CAUSEThis behavior occurs because %ProgramFiles% is a keyword for translation from a 64-bit operation to a 32-bit operation. This behavior enables a 32-bit application to work correctly with the %ProgramFiles% registry value when the application reads the %ProgramFiles% registry value later. RESOLUTIONTo prevent Windows Vista from changing the %ProgramFiles% registry value that a 32-bit application writes, use one of the following methods. Method 1Pass a lower-cased string (for example, %programfiles%) or a capitalized string (for example, %COMMONPROGRAMFILES%). This method bypasses the redirection of the registry value.Method 2Use the KEY_WOW64_64KEY flag when you try to open or to create the value. For more information about the KEY_WOW64_64KEY flag, visit the following Microsoft Web site:http://msdn2.microsoft.com/en-us/library/aa384129(VS.85).aspx
(http://msdn2.microsoft.com/en-us/library/aa384129(VS.85).aspx)
STATUS This behavior is by design. MORE INFORMATIONFor more information about the WOW64 implementation, visit the following Microsoft Web site: http://msdn.microsoft.com/en-us/library/aa384274(VS.85).aspx
(http://msdn.microsoft.com/en-us/library/aa384274(VS.85).aspx)
APPLIES TO
| Article Translations
|
Back to the top
