Solve the windows installer can't install when the samples directory string is end with "\".