I have some legacy code that does some string concatenation to reach to the "Application Data" folder of the running PC. It has hard-coded strings like "C:\Documents and Settings\", "\Local Settings\Application Data\" etc.
The problem is it doesn't work on different versions of windows because of hard-coding.
Can I get this folder's path programmatically? May be by using an environment variable etc?