For user accounts, the settings files are automatically redirected to the respective folder inside AppData folder. So if the user runs the program twice, one time using the administrator account, and the second time using the user account, they may get two separate settings files, which may lead to confusion. So, for storing the settings it is better to use dedicated folders. Further reading may be here. Viewed 8k times. GetDirectoryName Assembly. GetCurrentDirectory also doesn't work.
Improve this question. Ali Ali 1, 6 6 gold badges 36 36 silver badges 57 57 bronze badges. Add a comment. Active Oldest Votes. Problem solved by using: System. Improve this answer. GetDirectoryName assemblyLocation ;. Show adres ;.
Top Rated Most Recent. Accept Solution Reject Solution. For the current assembly you can use:. Copy Code. Posted 4-Sep pm Wendelius. Sergey Alexandrovich Kryukov 5-Sep am. This is the only universal and reliable way I know. All other create problem in different cases. A bit more detail in my solution -- please see.
Wendelius 5-Sep am. Thank you :. Here is the most universal way: C. Posted 4-Sep pm Sergey Alexandrovich Kryukov. Good addition, my 5. Thank you, Mika. Zeeshan-Ali89 6-Feb am. C access denied to path in a windows application. Path in Windows Services. How to modify retrieved path in Windows Application. Access to the path is denied. Layout: fixed fluid. Web01 2. Strip HTML. Encode HTML. Paste as-is. Code block. Quoted Text. Best guess.
Optional Password. Richard MacCutchan.
0コメント