wa4otj has asked for the wisdom of the Perl Monks concerning the following question:
I have over recent years written a number of small Perl utilities that get called from a massive (commercial) Windows program to accomplish various functions. When called, they of course open a DOS window, do their thing, and close it, usually only a couple of seconds at a time.
This was never a problem, but now suddenly it has become an issue. I tried simply changing the windows associations to call wperl.exe instead of Perl.exe.
That worked beautifully.
Well, almost.
It seems many of these little programs have a line of the form:
open(EP,"$DOSProg arguments|");
Some logic here interprets the data returned by DOSProg.
This runs a MSDOS program that does it's thing and returns data to my Perl script. When running under Wperl, the DOS window still pops up when this DOS app is called. This DOS program is a special purpose utility that would be difficult to re-create purely in Perl.
I am trying to figure out an elegant way to hide this secondary DOS window without requiring massive changes to all the places these scripts are called, etc. I want to find a low-work, low-risk solution to hiding the secondary DOS window.
I originally thought that since the wperl interpreter is running the Perl script in a hidden process, that any process it starts would be likewise. But I guess it isn't so. A shame as simply changing associations makes for an easily reversible hack for troubleshooting purposes.
Any suggestions?
Thanks,
Nat
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hiding the DOS window..
by sgifford (Prior) on Feb 20, 2005 at 03:47 UTC | |
by blazar (Canon) on Feb 20, 2005 at 14:01 UTC | |
by wa4otj (Beadle) on Feb 20, 2005 at 06:07 UTC | |
|
Re: Hiding the DOS window..
by Popcorn Dave (Abbot) on Feb 20, 2005 at 03:28 UTC | |
|
Re: Hiding the DOS window..
by PodMaster (Abbot) on Feb 20, 2005 at 03:50 UTC | |
|
More on Hiding DOS Windows
by wa4otj (Beadle) on Feb 20, 2005 at 06:18 UTC | |
by jonadab (Parson) on Feb 20, 2005 at 13:53 UTC | |
by wa4otj (Beadle) on Feb 20, 2005 at 17:14 UTC | |
by jonadab (Parson) on Feb 20, 2005 at 18:26 UTC | |
by wa4otj (Beadle) on Feb 22, 2005 at 05:21 UTC | |
by Mr. Muskrat (Canon) on Feb 21, 2005 at 02:23 UTC | |
by chanio (Priest) on Feb 21, 2005 at 03:40 UTC |