Basically, windows doesn't care character case of env variables.
And standard expression is SystemRoot and windir

http://msdn.microsoft.com/en-us/library/windows/desktop/aa384187(v=vs.85).aspx

I'll change code style and character cases, and request pull again.
It will be a different function on Windows entirely

Thanks