1

I'm trying to access the C:\Users\...

However, each computer has a different user name. I know there is a way to navigate via code to do this, but I can't for the life of me find an answer to this specific problem.

What should I place in ?

Attila
  • 28,265
  • 3
  • 46
  • 55
  • Could you please explain what are you trying to do it bit in more detail? Each computer can have many profiles/users also complicated by corporate networks/groups, etc. – ervinbosenbacher Apr 06 '12 at 22:49
  • 2
    possible duplicate of [How do I get the application data path in Windows using C++?](http://stackoverflow.com/questions/2899013/how-do-i-get-the-application-data-path-in-windows-using-c) – Rafał Rawicki Apr 06 '12 at 22:50
  • possible duplicate of [Windows: How to canonicalize a file to the special folder?](http://stackoverflow.com/questions/3181120/windows-how-to-canonicalize-a-file-to-the-special-folder) – Keith Randall Apr 06 '12 at 22:55

1 Answers1

1

Windows has a feature called specal folder names. For example you can use %windir% to locate the windows directory. As I see you need the %USERPROFILE%. You can find more about this, at Wikipedia.

Ákos Kovács
  • 502
  • 1
  • 10
  • 23