This behavior also occurs in the 64-bit versions of Windows Server 2003 and of Windows XP.
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:
Article ID: 950407 - Last Review: Mar 29, 2017 - Revision: 4