The windows account name can be seen as one the folders in C:\Users. Assuming you changed your windows account name to something different to the folder, can programs see your new windows account name given admin rights?

  • Why is this something you want to hide? Commented Mar 28, 2020 at 11:44
  • @multithr3at3d probably because OP uses his/her real name as account name and thus fears that anybody getting into that PC can then link to his/her real identity.
    – A. Darwin
    Commented Mar 28, 2020 at 20:59

1 Answer 1


Programs can get the current username using GetUserName() and the path of profile directory e.g. using GetUserProfileDirectoryA(). They use API calls instead of deducing something from directory names. And no administrative rights required for these.

  • I'm sure the registry would contain this information as well. Commented Mar 28, 2020 at 11:44
  • 1
    My main point here was that there's no need for using such methods as checking filesystem (or registry), because this is not a secret information and there are standard ways to get it. Commented Mar 28, 2020 at 11:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .