We are moving over to supporting netstandard and dot net core. In testing those scenarios I discovered that Environment.UserInteractive always returns true on netcore. And it seems to be by design, or at least in discussions i read it was not discussed as a bug, eg
https://github.com/dotnet/corefx/issues/6024#issuecomment-310816129. The work around suggested by many people is "just pass in a command line param that indicates it is a service". TBH i was not a fan of this suggestion. So i coded a solution that works on both normal .net and netcore. Yes it would be possible for us to say "use Environment.UserInteractive if on normal .net", but i was concerned about the ramifications of people trying to have to do the same trouble shooting i did, when they eventually move to netcore and have forgotten the caveats on UserInteractive.