Does anybody know output path Win Server 2008 for Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData

StackOverflow https://stackoverflow.com/questions/1440770

Question

I need do some quick and dirty logging and I was asked to write to a file.

I have done all the logging and now I need to save it somewhere on this Win Server 2008 Operating system.

Does anybody know what the output is in Win Server 2008 for the following line of code. string myPath=Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);

Thanks a lot.

Was it helpful?

Solution

Most likely it is

%systemdrive%\ProgramData

...which is probably

C:\ProgramData

unless Windows 2008 was installed on a drive other than C: (uncommon). Part of the reason Environment.SpecialFolder exists is so we don't have to think about these things.

http://msdn.microsoft.com/en-us/library/system.environment.specialfolder.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top