Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Environment.SpecialFolder.ProgramFiles value for a 32-bit application on Windows 7?

What would a 32-bit application running on Windows 7 return for the below?

Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)

C:\Program Files (x86) or C:\Program Files?

like image 907
Sameer Rastogi Avatar asked Aug 03 '10 15:08

Sameer Rastogi


2 Answers

On 32 bit Windows 7 you should get "C:\Program Files", on 64 bit "C:\Program Files (x86)".

like image 184
Mario Avatar answered Oct 26 '22 09:10

Mario


It doesn't matter what it returns. Either value will map to the same folder, file system virtualization will always map it to (x86) for a 32-bit app.

like image 20
Hans Passant Avatar answered Oct 26 '22 07:10

Hans Passant