Refactor: simplify read console (windows) (#17098)