implementation with windows host scripting

please check the last test case with loop.js