Improve command line exec; fix issue for Win2008