USER HOME DIRECTORY

  • Thread starter Thread starter Sean
  • Start date Start date
S

Sean

Hi all,

I am writing a desktop application. Now, I am having
problem figuring out the <Home Dir> path of a user.

I want to store user-specific data and I heard that
there's an easy way in .net to get the <Home Dir>.

Any help/suggestion would be greatly appreciated.
Thank you very much in advance.


regards,
Sean
 
Hi Sean,

string userHomePath =
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
, "..");

But i can recommand to use path:

string yourAppPath =
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
, "YourApp");

Cheers!

Marcin
 
Back
Top