Starting a Perl script with no command prompt window

Discussion in 'Perl Misc' started by PeteOlcott, Mar 10, 2008.

  1. PeteOlcott

    PeteOlcott Guest

    Does anyone know how to start a Perl script as an MS Windows XP Pro
    "Scheduled Task" and either have no "command prompt" window, or have
    the "command prompt" window be created as minimized?
    PeteOlcott, Mar 10, 2008
    #1
    1. Advertising

  2. PeteOlcott

    ccc31807 Guest

    On Mar 10, 10:10 am, PeteOlcott <> wrote:
    > Does anyone know how to start a Perl script as an MS Windows XP Pro
    > "Scheduled Task" and either have no "command prompt" window, or have
    > the "command prompt" window be created as minimized?


    Create a batch file that runs the Perl script. Schedule the batch file
    as a scheduled task.

    CC
    ccc31807, Mar 10, 2008
    #2
    1. Advertising

  3. PeteOlcott <> wrote:
    >Does anyone know how to start a Perl script as an MS Windows XP Pro
    >"Scheduled Task"


    Same as any other scheduled task.

    >and either have no "command prompt" window, or have
    >the "command prompt" window be created as minimized?


    Call wperl.exe (part of AcitveState Perl) instead of perl.exe as the
    interpreter.

    jue
    Jürgen Exner, Mar 10, 2008
    #3
  4. PeteOlcott

    Ben Morrow Guest

    Quoth PeteOlcott <>:
    > Does anyone know how to start a Perl script as an MS Windows XP Pro
    > "Scheduled Task" and either have no "command prompt" window, or have
    > the "command prompt" window be created as minimized?


    If you use wperl.exe instead of perl.exe, you don't get a command
    window. Of course, if you call any external programs, they probably *do*
    create one, so don't do that.

    Ben
    Ben Morrow, Mar 10, 2008
    #4
  5. PeteOlcott

    PeteOlcott Guest

    On Mar 10, 10:03 am, Ben Morrow <> wrote:
    > Quoth PeteOlcott <>:
    >
    > > Does anyone know how to start a Perl script as an MS Windows XP Pro
    > > "Scheduled Task" and either have no "command prompt" window, or have
    > > the "command prompt" window be created as minimized?

    >
    > If you use wperl.exe instead of perl.exe, you don't get a command
    > window. Of course, if you call any external programs, they probably *do*
    > create one, so don't do that.
    >
    > Ben


    None of these ideas seemed to work, but, I may have implemented them
    incorrectly.
    PeteOlcott, Mar 10, 2008
    #5
  6. PeteOlcott

    PeteOlcott Guest

    On Mar 10, 9:39 am, ccc31807 <> wrote:
    > On Mar 10, 10:10 am, PeteOlcott <> wrote:
    >
    > > Does anyone know how to start a Perl script as an MS Windows XP Pro
    > > "Scheduled Task" and either have no "command prompt" window, or have
    > > the "command prompt" window be created as minimized?

    >
    > Create a batch file that runs the Perl script. Schedule the batch file
    > as a scheduled task.
    >
    > CC


    I tried this and it did not work. I also tried various combinations
    of:
    cmd /min
    PeteOlcott, Mar 10, 2008
    #6
  7. PeteOlcott <> writes:

    > I tried this and it did not work. I also tried various combinations
    > of:
    > cmd /min


    How are you starting the program?

    Here's what I just did:

    rename the program using a new extension, for instance:

    program.gpl

    double click. then choose "select program", "browse..." (I'm guessing
    these names, I've got a Dutch windows install) and choose
    c:\perl\bin\wperl.exe

    Done.

    --
    Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
    Joost Diepenmaat, Mar 10, 2008
    #7
  8. PeteOlcott

    ccc31807 Guest

    On Mar 10, 12:54 pm, PeteOlcott <>
    > I tried this and it did not work. I also tried various combinations
    > of:
    > cmd /min


    Write a 'hello world' program and save it like this:

    #helloworld.plx
    print "Hello, world\n";

    Write a batch file and save it like this:
    REM run_hello
    perl helloworld.plx > hello.txt

    (The part after the greater than sign redirects the output of the
    helloworld program to a text file so you can see if it ran.)

    In your Windows Explorer or My Computer screen you should see two
    files, the plx file and the batch file. Double click on the batch file
    and check to see if it wrote the output to hello.txt.

    CC
    ccc31807, Mar 10, 2008
    #8
  9. PeteOlcott

    PeteOlcott Guest

    On Mar 10, 12:01 pm, Joost Diepenmaat <> wrote:
    > PeteOlcott <> writes:
    > > I tried this and it did not work. I also tried various combinations
    > > of:
    > > cmd /min

    >
    > How are you starting the program?
    >
    > Here's what I just did:
    >
    > rename the program using a new extension, for instance:
    >
    > program.gpl
    >
    > double click. then choose "select program", "browse..." (I'm guessing
    > these names, I've got a Dutch windows install) and choose
    > c:\perl\bin\wperl.exe
    >
    > Done.
    >
    > --
    > Joost Diepenmaat | blog:http://joost.zeekat.nl/| work:http://zeekat.nl/


    This worked. It still has a tiny little screen flash as soon as it
    gets done executing, but, this is far less annoying than the console
    window, popping up.
    PeteOlcott, Mar 10, 2008
    #9
  10. PeteOlcott

    Guest

    PeteOlcott $B$N%a%C%;!<%8(B:
    > Does anyone know how to start a Perl script as an MS Windows XP Pro
    > "Scheduled Task" and either have no "command prompt" window, or have
    > the "command prompt" window be created as minimized?


    There are several solutions for removing the command prompt window
    here:

    http://www.perlmonks.org/?node_id=536260
    , Mar 12, 2008
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. chrisdude911
    Replies:
    10
    Views:
    135,328
    srk289
    Mar 10, 2009
  2. gaurav kashyap
    Replies:
    2
    Views:
    605
    gaurav kashyap
    Oct 30, 2008
  3. gaurav kashyap
    Replies:
    3
    Views:
    672
    gaurav kashyap
    Oct 31, 2008
  4. Ulf Meinhardt
    Replies:
    0
    Views:
    421
    Ulf Meinhardt
    Dec 28, 2009
  5. kpowell10
    Replies:
    4
    Views:
    168
    Ben Morrow
    May 7, 2004
Loading...

Share This Page