How to get the current user's home directory in Windows

前端 未结 4 1830
野的像风
野的像风 2020-12-18 00:29

How can I get the path to the current User\'s home directory?

Ex: In Windows, if the current user is \"guest\" I need \"C:\\Users\\guest\"

My application wil

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-18 01:25

    I have used %USERPROFILE% to get path the current User's home directory.

提交回复
热议问题