Jerry,
   
    Aha - it's my error.
It's not the /k switch but rather the /C switch!
I.E.  <%COMSPEC%> /C c:\yourpath\yourfile.bat
 
    If you are calling your .bat ( or .cmd ) file from inside Perl
I think you would call it with 'exec'  instead of 'system' so
the .bat  or .cmd file excutes outside of Perl and never returns.
I think that the combination of the /C switch  and the final line:  'exit' \r\n
should close any DOS window.
 
  
Also. CPAN has runperl.pl which uses 'exec' to run perl batch files - maybe useful:
 
  
    Gregg
           
 
----- Original Message -----
Sent: Friday, April 14, 2006 10:43 AM
Subject: RE: How to kill a dos window

Gregg,

 

The “exit” in the batch file worked great.  I tried this in win 98 and it kills the command, but leaves the dos window open.  Do you know of any way to kill the open dos window in 98?

 

Thanks,

 

Jerry

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gregg Morrison
Sent: Friday, April 14, 2006 4:30 AM
To: Gerald Preston; [email protected]
Subject: Re: How to kill a dos window

 

Hi Jerry,

 

Try the "/K" Switch -

 

    %COMSPEC% /K  X:\path\batchfile.bat

 

- OR -

 

    Last line in Batch File:  "Exit"

 

 

Gregg Morrison

 


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to