Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Windows 64bit (http://www.velocityreviews.com/forums/f46-windows-64bit.html)
-   -   %programfiles% environment variable : Native Mode and WOW Mode (http://www.velocityreviews.com/forums/t626042-programfiles-environment-variable-native-mode-and-wow-mode.html)

 santhosh.kulandaiyan 07-17-2008 08:49 AM

%programfiles% environment variable : Native Mode and WOW Mode

Hello,

In a 64 bit windows registry, there are 2 nodes that expand the
%programfiles% environment variable.

hkey_local_machine\software\Microsoft\windows\curr entversion
programfilespath = %programfiles%
programfilesdir = c:\program files

hkey_local_machine\software\wow6432node\microsoft\ windows
\currentversion
programfilespath = %programfiles%
programfilesdir = c:\program files (x86)

So when a 32 bit process reads the %programfiles% it reads it as c:
\program files (x86)
and when a 64 bit process reads the %programfiles% it reads it as c:
\program files
---------------------------------------------

My question is, is it possible to define another environment variable
in the registry that will take different values based on whether the
process that is reading the environment variable is a 32 bit or a 64
bit process..?

In other words, is is possible to create a new environment variable
which will be accessed by "Registry Redirection" mehcanism when a 32
bit process tries to read that value ?

--------------------------------------------

I tried creating new variables called
XYZPath and XYZDir in both the registry nodes specified above but the
variable doesn't get reflected at all when i use the 'set' command.

Also i suppose creating a new environment variable in the registry
directory :
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager
\Environment
would not come under the context of registry redirection...

--------------------------------------

Thanks
Santhosh

 All times are GMT. The time now is 08:12 AM.