Improve checking of env variables branded main window
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
using getenv on windows produces warnings. The configured branded main window code uses getenv instead of something like _dupenv_s.