I haven’t been able to find an answer for this, I believe, because I don’t really know how to ask the question. My C# .net app needs to be able to specify something along the lines of %Windows% instead of C:\Windows in case the user is not using the C Drive for their windows installation. Also, I need to be able to do the same for their user folder path ie. “C:\Users\%usrname%\Desktop”
I would love to just be able to build a string from this info, or just be able to use some kind of identify (like I did above) to just pass that entire string to the File class.
I’m pretty sure this is simply, I just don’t know the right way to phrase it to get good Google results 😛
Thanks.
What you are looking for is
Enviroment.GetFolderPath(Enviroment.SpecialFolder)