Used same subprocess approach on Windows as on POSIX.