Windows services in PERL

Discussion in 'Perl Misc' started by harvar007, Jul 13, 2006.

  1. harvar007

    harvar007 Guest

    Hi

    I am trying to create a win32 service using the module win32:deamon. I
    wrote a simple code and tried to get that running before I went to the
    actual one. I am actually able to successfully create the service and
    see the same in the Management Console, but when I try to right click
    and say Start I get "error :1053 the service did not respond or start
    to the control request in a timely fashion"


    Can any one please, let me know what might be wrong in this scenario?

    Here is my sample code which I was trying to get installed!

    use Win32::Daemon;
    Win32::Daemon::StartService();
    while( SERVICE_START_PENDING != Win32::Daemon::State() )
    {
    sleep( 1 );
    }
    Win32::Daemon::State( SERVICE_RUNNING );
    unlink( glob( "c:\\temp\\*.tmp" ) );
    Win32::Daemon::StopService();

    Thanks
    Harini
     
    harvar007, Jul 13, 2006
    #1
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.