How do I run a Perl script as a Windows XP Service?

Discussion in 'Perl Misc' started by janicehwang1325@yahoo.com, May 31, 2006.

  1. Guest

    Hi all,


    I would like to run my Perl script as the service in Windows XP. How do
    achieve that? I heard that using Microsoft Management Console can
    achieve that. However, read thru the help file of the MMC, i still do
    not get how to create it. Do someone know how to start from the very
    beginning step?
     
    , May 31, 2006
    #1
    1. Advertising

  2. Thomas Kratz Guest

    wrote:
    > Hi all,
    >
    >
    > I would like to run my Perl script as the service in Windows XP. How do
    > achieve that? I heard that using Microsoft Management Console can
    > achieve that. However, read thru the help file of the MMC, i still do
    > not get how to create it. Do someone know how to start from the very
    > beginning step?
    >


    I don't know what is meant by the answer given under:

    http://tinyurl.com/rd6vy

    I have no idea how to create a service from a script with MMC.

    You may have better success with either googling for 'srvany.exe' from M$
    or better IMHO using the module Win32::Daemon to create a native service.

    Have a look at Win32::Daemon::Simple. It sits on top of Win32::Daemon to
    make the process much easier for you.

    Thomas

    --
    $/=$,,$_=<DATA>,s,(.*),$1,see;__END__
    s,^(.*\043),,mg,@_=map{[split'']}split;{#>J~.>_an~>>e~......>r~
    $_=$_[$%][$"];y,<~>^,-++-,?{$/=--$|?'"':#..u.t.^.o.P.r.>ha~.e..
    '%',s,(.),\$$/$1=1,,$;=$_}:/\w/?{y,_, ,,#..>s^~ht<._..._..c....
    print}:y,.,,||last,,,,,,$_=$;;eval,redo}#.....>.e.r^.>l^..>k^.-
     
    Thomas Kratz, May 31, 2006
    #2
    1. Advertising

  3. zentara Guest

    On 31 May 2006 01:12:53 -0700, ""
    <> wrote:

    >Hi all,
    >
    >
    >I would like to run my Perl script as the service in Windows XP. How do
    >achieve that? I heard that using Microsoft Management Console can
    >achieve that. However, read thru the help file of the MMC, i still do
    >not get how to create it. Do someone know how to start from the very
    >beginning step?


    Personally I don't use Win32, but check out these:

    http://perlmonks.org?node_id=522586

    http://perlmonks.org?node_id=251168

    http://perlmonks.org?node_id=338496

    or do yourself a favor, and ask there.



    --
    I'm not really a human, but I play one on earth.
    http://zentara.net/japh.html
     
    zentara, May 31, 2006
    #3
  4. Guest

    , May 31, 2006
    #4
  5. Guest

    Thanks for the reply. I had tried to implemet Win32::Daemon::Simple
    into my script. However, the service could not be started. I dunno what
    is the reason. I try to debug and found out that the program and be
    runned if i run it manually in cmd.exe using perl client.pl. however,
    the program will close when i close cmd.exe.

    I wil trying the other websites that others give. Anyway, thanks a lot.
    I fould out that MMC is just for CGI- Perl script whereby you can map
    the CGI script to the IIS and use MMC to implement it as service.

    Thomas Kratz wrote:
    > wrote:
    > > Hi all,
    > >
    > >
    > > I would like to run my Perl script as the service in Windows XP. How do
    > > achieve that? I heard that using Microsoft Management Console can
    > > achieve that. However, read thru the help file of the MMC, i still do
    > > not get how to create it. Do someone know how to start from the very
    > > beginning step?
    > >

    >
    > I don't know what is meant by the answer given under:
    >
    > http://tinyurl.com/rd6vy
    >
    > I have no idea how to create a service from a script with MMC.
    >
    > You may have better success with either googling for 'srvany.exe' from M$
    > or better IMHO using the module Win32::Daemon to create a native service.
    >
    > Have a look at Win32::Daemon::Simple. It sits on top of Win32::Daemon to
    > make the process much easier for you.
    >
    > Thomas
    >
    > --
    > $/=$,,$_=<DATA>,s,(.*),$1,see;__END__
    > s,^(.*\043),,mg,@_=map{[split'']}split;{#>J~.>_an~>>e~......>r~
    > $_=$_[$%][$"];y,<~>^,-++-,?{$/=--$|?'"':#..u.t.^.o.P.r.>ha~.e..
    > '%',s,(.),\$$/$1=1,,$;=$_}:/\w/?{y,_, ,,#..>s^~ht<._..._..c....
    > print}:y,.,,||last,,,,,,$_=$;;eval,redo}#.....>.e.r^.>l^..>k^.-
     
    , Jun 1, 2006
    #5
  6. Guest

    thanks for the site. It's useful!!!

    zentara wrote:
    > On 31 May 2006 01:12:53 -0700, ""
    > <> wrote:
    >
    > >Hi all,
    > >
    > >
    > >I would like to run my Perl script as the service in Windows XP. How do
    > >achieve that? I heard that using Microsoft Management Console can
    > >achieve that. However, read thru the help file of the MMC, i still do
    > >not get how to create it. Do someone know how to start from the very
    > >beginning step?

    >
    > Personally I don't use Win32, but check out these:
    >
    > http://perlmonks.org?node_id=522586
    >
    > http://perlmonks.org?node_id=251168
    >
    > http://perlmonks.org?node_id=338496
    >
    > or do yourself a favor, and ask there.
    >
    >
    >
    > --
    > I'm not really a human, but I play one on earth.
    > http://zentara.net/japh.html
     
    , Jun 1, 2006
    #6
    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. dpackwood
    Replies:
    3
    Views:
    1,841
  2. Replies:
    6
    Views:
    166
    Tad McClellan
    Apr 14, 2005
  3. Jeffery Jones

    Perl script as Windows service fails to run

    Jeffery Jones, Apr 14, 2006, in forum: Perl Misc
    Replies:
    3
    Views:
    160
    Jeffery Jones
    Apr 15, 2006
  4. hara
    Replies:
    6
    Views:
    173
    Peter Scott
    May 27, 2006
  5. max
    Replies:
    3
    Views:
    459
Loading...

Share This Page