Click to See Complete Forum and Search --> : x64 environment variables


shersh
April 6th, 2009, 06:05 PM
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 to x:\Program Files and x:\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 shortcut link points to x:\Program Files (x86)\... , but this games is actually in x:\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?

Thanks in advance.

_Superman_
April 7th, 2009, 12:15 AM
%PROGRAMFILES% and %PROGRAMFILES(X86)% are different only for 64-bit applications.
The application you are using is probably 32-bit.

MrViggy
April 7th, 2009, 04:05 PM
My guess is for backward compatibility with 32 bit apps. Look for %ProgramW6432% instead.

Viggy

shadowx360
April 9th, 2009, 08:00 AM
You can go and get the environment variable for %systemdrive% and then you can go and manual move the directory to Program Files or Program Files (x86).