Possible Duplicate:
How can i get the path of the current user’s “Application Data” folder?
Windows XP Application Data Folder?
I have to save some settings in application data but, when i use something as "@C:\Documents ..." someone can run windous on D:\ So how to get that directory ??
You can use
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);…And there’s exaple, how you can use it:
and it returns something like
C:\\Users\\UserName\\ApplicationDataand you can use Environment.SpecialFolder.Desktop too so you can get to desktop of actual user…