Improvements to Windows scripts