[TIMOB-16386] [TIMOB-16421] Refactored Windows environment detection