One thing, you should check: Is the string "mkdir c:\newdir" really working? Shouldn' it read "mkdir c:\\newdir" in your c/c++ program? You probably need to escape the "\", which otherwise would be interpreted as newline aka "\n" in that string. Does that mkdir stuff in your program work under windows?