Re: Launch windows exe from perl



"Paul Lalli" <mritty@xxxxxxxxx> wrote:

> jl_post@xxxxxxxxxxx wrote:
>> > Troot wrote:
>> > > ps Do you know if there is a way to get Perl to wait until the
>> > > opened app is finished? Its cool if its too difficult to do.
>>
>> Paul Lalli replied:
>> > That is, in fact, the default behavior of system. If you wanted
>> > it to not wait, you'd have to do some magic involving fork()...
>>
>>
>> If you're using Win32, there's no need to use fork(). You can just
>> use the "start" command inside the call to system(), like this:
>>
>> system("start notepad.exe");
>>
>> This will start the "notepad.exe" application without halting the Perl
>> script.
>
> Huh, good to know. I rarely program in Windows, so I'd never
> encountered that. Thanks for the tip.

Another one, if you want to open the current directory in a cmd.exe use:

start .

--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html

.



Relevant Pages

  • Re: Erasing a file
    ... Huh? ... > Microsoft MVP ... > Get Windows XP Service Pack 2 with Advanced Security Technologies: ... Prev by Date: ...
    (microsoft.public.windowsxp.general)
  • Re: web page
    ... >> Dan wrote: ... >>> From a button press on a form in a Windows Application, ... Didn't catch my sig, huh? ... Prev by Date: ...
    (microsoft.public.vb.syntax)
  • RE: 0x8024402F
    ... > I have the same problem with XP after I've tried to connect to the windows ... >>> Nobody know the answer huh? ... Prev by Date: ...
    (microsoft.public.windowsupdate)
  • RE: 0x8024402F
    ... I have the same problem with XP after I've tried to connect to the windows ... "Mike Decato" wrote: ... >> Nobody know the answer huh? ... Prev by Date: ...
    (microsoft.public.windowsupdate)
  • Cold Calling Scammers Must Die!
    ... "Windows and Linux" He says (As it happens I've had Solaris, ... "The oldest is reporting problems." ... better self control in the future. ...
    (alt.sysadmin.recovery)