Bug introduced in 10.0 and persisting through 11.3
A support case with the identification [CASE:3618534] was created.
[...] I filed a report with our development team raising the issues [...]
$EvaluationEnvironment
was supposed to be a panacea for: Good way to discriminate between Mathematica/PlayerPro/CDFPlayer
But from my experience it is not full working in a "desktop" area.
The remaining question is: I don't have time to check everything, could you? :)
Working:
"WebEvaluation"
"WebAPI"
"WebForm"
"Subkernel"
(fixed somewhere around 11.2)
I'm not sure
"Session"
- it works well but all others that fail return "Session" so tough to count on it"WebLoad"
not clear in comparison to"WebAPI"
"RemoteSession", "WebServer", "CloudCDF", "PlugInCDF", "WSTP"
- not tested
Not working:
"CDF"
"Script"
"Scheduled"