modify func run Cpp to adapt dos env