What is the best way to get this folder path programmatically :
Windows\system32\config\systemprofile\AppData\Local
?
How to get Windows\system32\config\systemprofile\AppData\Local\ folder path in C#?
9.4k Views Asked by Andrei Karcheuski At
4
There are 4 best solutions below
12

I think you can use Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData
In my project like this
string configPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "MyProject", "SERVICER", "config.ini");
It get Application Data Directory for all user ( contain System, Service, Guest,... ). I use it for save config of Service!!
I can't write comments sorry. What are you using the path for? Where is the application stored? This will get you there??
Provided C: is the name of the drive.
You really need to expand on your question a little bit.
Is this a duplicate question??
How to read existing text files without defining path