How can i get the path of the current user's “Application Data” folder?

前端 未结 6 1207
暖寄归人
暖寄归人 2020-11-27 19:56

1)how can i find out the Windows Installation drive in which the user is working.? I need this to navigate to the ApplicationData in DocumentsandSettings.

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 20:28

    Have a look at the Environment.SpecialFolders

    Environment.SpecialFolder.ApplicationData;
    Environment.SpecialFolder.System
    

    that should get you round the username requirement as well.

提交回复
热议问题