J
John Hager
------=_Part_1586_21195276.1121215496888
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Forgive my newbness =20
I am attempting to fire up a dos batch file, like for example startup a=20
jboss server instance.=20
In my *.rb script, I have this straight snippet:=20
puts %x{ c:/zone/jboss-4.0.1sp1/bin/run.bat -c node1 }
It works when I hard-code the path and args as in the sample above.=20
The path and path-args are hard-coded, because I can't figure out how to=20
pass in a variable and still get the server to start.=20
I have tried these:=20
puts %x{ printf "%s/bin/run.bat -c %s", serverPath, nodeName }
puts %x{ serverPath + "/bin/run.bat -c " + nodeName }
print %x{ serverPath + "/bin/run.bat -c " + nodeName }
and all kinds of others, so how to make the magic? How would you launch a=
=20
narly .bat file with a bunch of args and slashes passed along?=20
Also, is there a way to fire the DOS batch file and not have the script=20
pause for the process to finish ... so a non-blocking dos call?=20
Thanks.=20
-John A
------=_Part_1586_21195276.1121215496888--
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Forgive my newbness =20
I am attempting to fire up a dos batch file, like for example startup a=20
jboss server instance.=20
In my *.rb script, I have this straight snippet:=20
puts %x{ c:/zone/jboss-4.0.1sp1/bin/run.bat -c node1 }
It works when I hard-code the path and args as in the sample above.=20
The path and path-args are hard-coded, because I can't figure out how to=20
pass in a variable and still get the server to start.=20
I have tried these:=20
puts %x{ printf "%s/bin/run.bat -c %s", serverPath, nodeName }
puts %x{ serverPath + "/bin/run.bat -c " + nodeName }
print %x{ serverPath + "/bin/run.bat -c " + nodeName }
and all kinds of others, so how to make the magic? How would you launch a=
=20
narly .bat file with a bunch of args and slashes passed along?=20
Also, is there a way to fire the DOS batch file and not have the script=20
pause for the process to finish ... so a non-blocking dos call?=20
Thanks.=20
-John A
------=_Part_1586_21195276.1121215496888--