Retrieving 'Program Files' path

Oct 15, 2010 at 1:11 PM


What would be the best way to retrieve a string containing the 'Program Files' path from my device?

Our application is deployed on different devices which don't always come in the same language.  'Program Files' is called different in Dutch.

I need to copy a config file to the 'Program Files' folder.  Hard-coding every language is not the best option in this case..

Thanks in advance,


Oct 15, 2010 at 6:13 PM


what about using "public string GetDeviceSystemFolderPath(SystemFolders Folder)" from RAPI class?


Oct 18, 2010 at 7:10 AM

Thanks Rev,

I already tried GetDeviceSystemFolderPath, but without success.  Each of those SystemFolders enumerator comes up with something else.

For example:

\Windows\Start Menu\Programs
\My Documents


I'm just looking for the folder where applications are installed by default ("\Programs Files")


a way to retrieve some language code from the device, something to identify the language of the device.  Haven't found that either.