There are a number of ways to go about this, but I think you would
likely get better information if you ask a slightly more generalized
form of this question to a Windows support forum. What you want to ask
is, “How do I use one Windows system to run a program on another Windows
system?”
Personally, I just install openssh under Cygwin so that I can run
programs remotely on my Windows systems the same way I do for my Unix
systems; however, this may not be the best way for you depending on your
circumstances. It’s not exactly trivial to set up, but if you want to
also run programs remotely on non-Windows systems, you should probably
consider it for the sake of consistency.
Another option may be to use PsExec:
I hear this works fairly well, but I don’t know anything about how
secure or robust it is. It’s supposed to be pretty trivial though.
Using either of the above methods, you need to make sure that your
script is available to the remote system either from a file share or
somewhere on the remote system itself. You should then be able to
invoke Ruby to run that script.
-Jeremy
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.