Reputation: 2564
For Windows Vista and up, the user folder C:\Users\MyUser
the folder is accessed programatically like this
Environment.ExpandEnvironmentVariables(@"%userprofile%\");
How do I access the user folder in XP? Like this
C:\Documents and Settings\MyUser\
EDIT: I am using Framework 2.0
Upvotes: 0
Views: 144
Reputation: 175826
Use the SpecialFolder
enumeration (.Net 4)
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
Upvotes: 2