I am a lamer in programming. I decided to write a program that will work with a specific program installed on the PC by the user. Her path is C:\Users\Администратор\AppData\Local (for me personally). I know that other users will have a different Username (and not like my Administrator).
The question is how to specify the path to the program files located in %appdata% if the system user names are different?
|
1 answer
You yourself said - in %appdata% . Use this environment variable (you can get its value using the getenv function) to build the file path for the current user.
It is unlikely that you are interested in the program climbing into other folders :)
- Only
%localappdata%, not%appdata%, judging by the path given in the question. :) - Yaant 1:22 - @Yaant Actually, yes, but that’s what the vehicle needs - at least
%temp%:) - Harry
|