Fix launch app issue on windows.

This should fix all the "unable to launch" bugs on windows. (#3444, #3442)

@devoncarew PTAL thanks