Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^6: exec()ed process dont write to std(?:err|out) (system)

by demerphq (Chancellor)
on Apr 13, 2004 at 16:07 UTC ( [id://344773]=note: print w/replies, xml ) Need Help??


in reply to Re^5: exec()ed process dont write to std(?:err|out) (system)
in thread exec()ed process dont write to std(?:err|out)

You can even steal a trick I've used several times

Heh, believe me I thought of it already. And yes I thought of it as "tye's trick", from one of the registry tools you posted. :-) The problem with it was that I couldn't (and still can't) see how I can use a single wrapper with multiple scripts this way. I was worried about multiple scripts modifying the batch file simultaneously. And if I wrap all the scripts in the first place then I might as well just modify pl2bat to do the right thing in the first place.

But using start with a specific name hadnt occured to me. Good idea. Thanks.


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi


Replies are listed 'Best First'.
Re^7: exec()ed process dont write to std(?:err|out) (system)
by bbfu (Curate) on Apr 13, 2004 at 19:06 UTC

    I couldn't (and still can't) see how I can use a single wrapper with multiple scripts this way.

    Something like this, maybe?

    @echo off REM REM nperl.bat REM REM Assumes %1 holds perl script copy /Y C:\Perl\bin\perl.exe %1.exe > NUL %1.exe %* del /Y %1.exe > NUL

    Put it in your path, and call it as: nperl script.pl args

    I tried to figure out a way to avoid hard-coding the path to the perl executable, but Windows batch files are pretty limited and I couldn't come up with one.

    Update: This might not work on earlier versions of Windows (ie, pre-2k? non-NT based?), as they don't support the %* construct. (At least, I don't think they do.)

    bbfu
    Black flowers blossom
    Fearless on my breath

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-24 03:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found