The documentation for GetWindowsDirectory says:
So, I am working on a C# class library that needs to be TS-Aware, because I cannot require all apps using this library to be non-TS-Aware. The C# default is to be TS-Aware.
I need to drop INI files into the Windows directory to communicate with a legacy App that is NOT TS-Aware. This works without difficulty in a regular user, but not in a Terminal Services session.
Under Terminal Services:
I need to:
SystemInformation.TerminalServerSession
flag.I think it is always under the user folder in the windows sub directory, so:
System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "windows");