getting the current user's profile

Dear All,
Is there a way to get the path for the current user's MyDocuments folder
i.e  in my machine it is "C:\Documents and Settings\UserName\MyDocuments"

I know that we can get the current user name by the WindowsIdentity object's getCurrent method but what I want to get is that path for the user's MyDocuments folder

Any help is appreciated

Thankx


Answer this question

getting the current user's profile

  • madfan

    There's not need to play around of current user's identity.
    It's just that simple:

    Environment.GetFolderPath(Environment.SpecialFolder.Personal));



  • EHamel

    Thankx alot



  • getting the current user's profile