Environment variables
Hello! I have some problems with Win7 x64 environment variables. Question 1: Why %PROGRAMFILES%and %PROGRAMFILES(X86)% both lead to x:\Program Files (x86)- not tox:\Program Files andx:\Program Files (x86)? I am unable to run some shortcuts (e.g. "x:\ProgramData\Microsoft\Windows\Start Menu\Programs\Games\Solitaire.lnk" ) from win32 app, because the link points tox:\Program Files (x86)\..., but this games is actually inx:\Program Files\... Question 2: How do I know where the app is found in fact? Question 3: How do I run such shortcuts and get icons from them from win32 app? Thanksin advance.
April 7th, 2009 12:31am

Environment variables are a holdout from the DOS era. New programs that are native x64 are aware of the redirect. I develop for x64 and have done so for many years now. IT/Developer, Windows/Linux/Whatever I need a new web server, the antique IBM 300GL has a 137GB disk limit, for my chess site. I wanted to post many more downloadable files, the existing 30GB disk is insufficient.
Free Windows Admin Tool Kit Click here and download it now
April 7th, 2009 2:44am

What is left to do for those who uses win32, except of asking borland to develope x64 delphi?
April 7th, 2009 3:53am

The variables you are seeing are what you would see in a 32 bit command prompt, C:\Windows\SysWOW64\cmd.exe:C:\Windows\SysWOW64>set progProgramFiles=C:\Program Files (x86)ProgramFiles(x86)=C:\Program Files (x86)ProgramW6432=C:\Program FilesThe 64 bit cmd shows different settings:C:\>set progProgramFiles=C:\Program FilesProgramFiles(x86)=C:\Program Files (x86)If your applications are 32 bit, they should be put in %ProgramFiles(x86)%. They have a better chance of working.I agree that the locations they chose don't make sense. But that's the way it is.Why not System64 and Program Files (x64)? That would have made more sense to me.
Free Windows Admin Tool Kit Click here and download it now
April 7th, 2009 4:43am

Thank you for your reply! I just want to know is there any good way to run shortcuts which may lead to x64 program files from win32 app? The only way I can imagine is to run the shortcuts from special small x64 app. Am I right?
April 7th, 2009 4:53am

You are probably right.I am not even sure if a hard coded path, such as "C:\Windows\System32\cmd.exe /c SomePath\script.bat"would execute correctly. It might be worth a try, though.
Free Windows Admin Tool Kit Click here and download it now
April 7th, 2009 5:07am

Not possible in notmal circumstances as the calling conventions for x86 will fail when calling an x64 except using the ShellExecute() method. In general mixed 32-bit and 64-bit are bound to fail. Better off to be pure 32-bit or pure 64-bit to minimize problems. Using a shell script is a very clumsy way to be programming.IT/Developer, Windows/Linux/Whatever I need a new web server, the antique IBM 300GL has a 137GB disk limit, for my chess site. I wanted to post many more downloadable files, the existing 30GB disk is insufficient.
April 8th, 2009 12:23am

What is left to do for those who uses win32, except of asking borland to develope x64 delphi? As far as I know Borland has orphaned Delphi. IT/Developer, Windows/Linux/Whatever I need a new web server, the antique IBM 300GL has a 137GB disk limit, for my chess site. I wanted to post many more downloadable files, the existing 30GB disk is insufficient.
Free Windows Admin Tool Kit Click here and download it now
April 8th, 2009 12:24am

Hello everybody. Can you rell mr that where, I can get all the environment variables for: Windows Vista, Server 2008/Windows 7 and Server 2008 R2 (both x86 and x64). I want these variables, some of them are known to me but I want to know all (each and every of them). Please tell me if know them or provide any link to any Technet/MSDN article about this. Thank you in advance. bcdalai: http://bcdalai.blogspot.com/Free Tech. Support http://bcdalai.blogspot.com/
May 15th, 2010 11:57am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics