<p>Ruby's standard popen3 module does not work on Windows. Is there a maintained replacement that allows for separating stdin, stdout, and stderr?</p>

POpen4
gem has a common interface between unix and Windows. The following example (from their website) works like a charm.
```
```
require 'rubygems'
require 'popen4'

status =
  POpen4::popen4("cmd") do |stdout, stderr, stdin, pid|
    stdin.puts "echo hello world!"
    stdin.puts "echo ERROR! 1>&2"
    stdin.puts "exit"
    stdin.close

    puts "pid        : #{ pid }"
    puts "stdout     : #{ stdout.read.strip }"
    puts "stderr     : #{ stderr.read.strip }"
  end

puts "status     : #{ status.inspect }"
puts "exitstatus : #{ status.exitstatus }"
```
```