--Sig_/k2QjpAAee=jaz.7.eiBuSkG
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Am Sat, 21 Jul 2012 04:06:37 +0900
schrieb Joel Pearson <lists / ruby-forum.com>:
> That works with an .rb extension but not .rbw
> Seems to be DOS based commands that aren't working without a console,=20
> and that extends to cmd itself.
> Interestingly I do get a flicker of a cmd window running that with=20
> rubyw, but it doesn't hide the file.
> It works if I use command prompt with ruby and run 'rubyw.exe
> test.rbw' from inside the command prompt window.
>=20
> Joe
>=20

It=E2=80=99s been a while since I last did some Windows stuff, but if I
remember correctly, to run any external command you need to attach a
console window to a process. ruby.exe does this by default (resulting
in the CMD popup), and rubyw.exe doesn=E2=80=99t do this (causing no popup).
However, this behaviour is inherited by any child processes, so if you
want to run a command from a process not having a console window
attached, you first have to allocate one using the Win32API and then
attach it to your process. I=E2=80=99ve not done this, but AFAIK it=E2=80=
=99s possible
with the win32-process gem and its wrapper around the CreateProcess()
Win32API function.

Valete,
Marvin

--=20
Blog: http://pegasus-alpha.eu/blog

ASCII-Ribbon-Kampagne        ()   | ASCII Ribbon Campaign        ()
- Stoppt HTML-E-Mail         /\   | - Against HTML E-Mail        /\
- Stoppt propriet=C3=A4re Anh=C3=A4nge      | - Against proprietary attachm=
ents
www.asciiribbon.org/index-de.html | www.asciiribbon.org

--Sig_/k2QjpAAee=jaz.7.eiBuSkG
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iQEcBAEBAgAGBQJQCcCYAAoJELh1XLHFkqharOQIAK0ILxu1Co2Tg0MWIbMd+7kw
TQNuEe1YxPNj3zB6ibg/LVMDnYdjcLsc73fxm2jvN/4iuTSCeQyF3mIdDMfDWODv
d/SPfZmcZNKeULbrpCtvLLZZiEPcGe1TxcLkdow3tbElAdEcwJRsYJpBjbuPdXeT
YgFYzrVxzljP9gBywKcJbIRJfDoTky82UUAfnP7bdZ9VHEd1YTwbdrCtud4K1RN1
+gdcFts8PAtTYOPq5/6yKojd4IsjN/ZqaIHzsFR+iqY6G2HaEkIKLOTMqcw3QGAz
5y6BXJqobBb4TKDoZPNr6MpZSQwSamnOW0MHPQACRmXmD/LauICFq9+TB/L4FLY=
=T9Cp
-----END PGP SIGNATURE-----

--Sig_/k2QjpAAee=jaz.7.eiBuSkG--