transplant code to windows

use the windows style RootDirString