General discussion

Locked

System call to GUI executable from perl

By soxman ·
I am trying to run a system command to a GUI program from within a perl script WITHOUT waiting for the called program to complete. I have tried numerous combinations of `cmd start GUIcommandbeingcalled` without success--I can't get the program to start without the perl script waiting for it to complete--which I don't want to do--I just want to know that it got started successfully. I can run a "start GUICommandbeing called" just fine from a Windows CMD window but not from perl. I've tried system calls and backticks, which should be the same, but without success.

This should be easy, right!

Thanks for any help

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

System call to GUI executable from perl

by Lusu In reply to System call to GUI execut ...

did you tried:

cmd /c start notepad.exe
?

Lusu.

Collapse -

System call to GUI executable from perl

by soxman In reply to System call to GUI execut ...

The question was auto-closed by TechRepublic

Collapse -

System call to GUI executable from perl

by mike_dietz In reply to System call to GUI execut ...

You can use the exec command, which will start the gui program and never return.

If you want to continue execution of the PERL script you could build a batch file by opening a file, printing the batch statements to the file, then use the systemcommand to run the batch file. The start command does not wait for the executable to finish before continuing.

Collapse -

System call to GUI executable from perl

by soxman In reply to System call to GUI execut ...

The question was auto-closed by TechRepublic

Collapse -

System call to GUI executable from perl

by soxman In reply to System call to GUI execut ...

As a followup to my original question:
1. cmd /c doesn't do it
2. exec isn't what I want since it forks a new process and never returns to the calling perl.
3. I ended up using a perl module, Win32:Process, to create and follow the routine I needed. It's not exactly what I want but the best I could find. Wonder if anyone has done something like this too and can offer some lessons learned.

Collapse -

System call to GUI executable from perl

by soxman In reply to System call to GUI execut ...

The question was auto-closed by TechRepublic

Collapse -

System call to GUI executable from perl

by soxman In reply to System call to GUI execut ...

This question was auto closed due to inactivity

Back to Web Development Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums