I'm checking the windows version in an installer (made with NSIS) by checking the following registry key: