Get the Program Files folder

For the current user:

System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles ));

For all users

System.Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles ));

32 bit executable under windows 64 bit for the current user

 System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86 ));

For the current user

System.Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFilesX86 ));
Lastest update in May 2011, inital post in May 2011

Write a comment

I appreciate comments, suggestions, compliments etc. Unfortunately I have no time to reply to them. Useful input will be used for sure!