Hi
My application it's targeting x86, the machine it's a x64. I need the common program files path for the current machine.
But after expanding the commonprogramfiles var or commonprogramfiles(x86), or by using the special folder enum, in both situations it returns the x86 path...
Why i cant get the "C:\Program Files\Common Files" ?!?!
It's because of the target CPU?!
Thanks
My application it's targeting x86, the machine it's a x64. I need the common program files path for the current machine.
But after expanding the commonprogramfiles var or commonprogramfiles(x86), or by using the special folder enum, in both situations it returns the x86 path...
Code:
?Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles)
"C:\Program Files (x86)\Common Files"
?Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFilesX86)
"C:\Program Files (x86)\Common Files"
?Environment.ExpandEnvironmentVariables("%commonprogramfiles%")
"C:\Program Files (x86)\Common Files"
?Environment.ExpandEnvironmentVariables("%commonprogramfiles(x86)%")
"C:\Program Files (x86)\Common Files"
It's because of the target CPU?!
Thanks