On Thu, 14 Apr 2005, Kevin Carothers wrote:
> On 4/14/05, Dan Baumbach <[EMAIL PROTECTED]> wrote:
> > I'm running a perl script that checks the viability of a server.  I have
> > the script scheduled to run every 5 minutes.  That means every five
> > minutes I have a command window flash on the computer as the script is
> > being run.  Is there any way to keep this command window from comming
> > up?  The script sends an email if there is server failure so I don't
> > need to see any direct output from the script.
> >
> > Thanks in advance for your answers.
> >
> > - Dan.
> >
> 
> Hi Dan!
> 
> Try this;
> 
>   use Win32::OLE;

You don't need Win32::OLE for Win32::SetChildShowWindow().

>    [---]
> 
>   my($sysCmd) = "cmd.exe /c  mypgm.exe";
>   Win32::SetChildShowWindow(0);      ## make the DOS window invisible
>   system($sysCmd);

That works to suppress command windows for child processes.  To suppress
the command window of the perl program itself, just run it via wperl.exe
instead of perl.exe.

Cheers,
-Jan



_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to