Microsoft Knowledge Base Email Alertz

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 Vista

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

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 Vista

Article ID: 950407 - View products that this article applies to.

On This Page

SYMPTOMS

When 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.

CAUSE

This 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.

RESOLUTION

To prevent Windows Vista from changing the %ProgramFiles% registry value that a 32-bit application writes, use one of the following methods.

Method 1

Pass a lower-cased string (for example, %programfiles%) or a capitalized string (for example, %COMMONPROGRAMFILES%). This method bypasses the redirection of the registry value.

Method 2

Use 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

STATUS

This behavior is by design.

MORE INFORMATION

For more information about the WOW64 implementation, visit the following Microsoft Web site:
http://msdn.microsoft.com/en-us/library/aa384274(VS.85).aspx

Properties

Article ID: 950407 - Last Review: April 16, 2008 - Revision: 1.4
APPLIES TO
  • Windows Vista Enterprise 64-bit Edition
  • Windows Vista Home Basic 64-bit Edition
  • Windows Vista Home Premium 64-bit Edition
  • Windows Vista Ultimate 64-bit Edition
  • Windows Vista Business 64-bit Edition
  • Microsoft Windows XP Professional 64-Bit Edition (Itanium)
  • Microsoft Windows Server 2003, Datacenter x64 Edition
  • Microsoft Windows Server 2003, Enterprise x64 Edition
  • Microsoft Windows Server 2003, Standard x64 Edition
Keywords: 
kbexpertiseadvanced kbtshoot kbprb KB950407
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate