Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: WIN32 exec mystery

by Courage (Parson)
on Jul 02, 2002 at 20:22 UTC ( #178988=note: print w/replies, xml ) Need Help??


in reply to WIN32 exec mystery

I'll try to answer your first part of a question about running programs with/without console window.

Actually perl internally parses your command to know what to run and which arguments to pass. Hence difference when you add extra quotes.
Here is a side remark - I dislike "exec" on Win32 platform very much - it seems not to do anything good in any my attempts to use it appropriately.

And, as I see, you try to start a program without console on windows, and you overcomplicated a task.
See a discussion at How to 'invoke' a PDF file on Win32 about how similar task was solved. Let me know if you need something different than I understood.

Courage, the Cowardly Dog

Replies are listed 'Best First'.
Re: Re: WIN32 exec mystery
by major tom (Novice) on Jul 02, 2002 at 22:58 UTC
    Firstly , Thanks for input!

    I'm adjusting some settings regarding to the program that I want to start both before it's started and afterwards - when its up and running. It's a GUI-program, so I would like users not to see the console window at all, but that is not highest priority.

    You say quote:
    "Actually perl internally parses your command to know what to run and which arguments to pass. Hence difference when you add extra quotes."

    What does this mean regarding to the console window that won't be killed (or the console windows (not) appearing)? It seems that when I use

    my $prg= ' "c:/winnt/notepad.exe" ';

    and

    exec $prg ;

    in the child process there is some other process starting up, which keep the perl program from ending (and thus closing the console window)?! Tom

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://178988]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2022-05-20 15:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (73 votes). Check out past polls.

    Notices?