I have a simple problem. I have a path to a file in user directory that looks like this:
%USERPROFILE%\\AppData\\Local\\MyProg\\settings.file
You can use the Environment.Username constant as well. Both of the %USERPROFILE% and this Environment variable points the same( which is the currently logged user). But if you choose this way, you have to concatenate the path by yourself.
Environment.Username
%USERPROFILE%