I tried this (WinXP Pro) and it worked like a charm. Are you using the
SERVICE name or the DISPLAY name?

SERVICE_NAME: WZCSVC
DISPLAY_NAME: Wireless Zero Configuration
Provides automatic configuration for the 802.11 adapters
        TYPE              : 20 WIN32_SHARE_PROCESS
        STATE             : 4  RUNNING
                               (STOPPABLE,NOT_PAUSABLE,ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE   : 0  (0x0)
        SERVICE_EXIT_CODE : 0  (0x0)
        CHECKPOINT        : 0x0
        WAIT_HINT         : 0x0

perl -e "use Win32::Service; Win32::Service::StartService( '', 'WZCSVC'
);"

Try using PsService (part of PSTools) from
http://www.sysinternals.com/ntw2k/freeware/psservice.shtml to see what
are the service names.
Don't forget to stop services in such a way as you don't try to stop one
that some other depends on...

HTH,
  Fernando Madruga


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of
Esteban Adri�n Mar�ngolo
Sent: quinta-feira, 11 de Julho de 2002 14:44
To: [EMAIL PROTECTED]
Subject: Win32::Service::(Start|Stop)Service Error 997



Hi there,

        I'm making a script to backup certain files on a NT Server. In
order to do it properly, i have to stop some services (because a file
locking issue), ie. MSExhange*.

        When i run:

        $h = ''; # hostname
        Win32::Service::StartService($h,"Service Name");
        
        (In an analog way to "StopService" method).

        I get nothing. No Service (Start|Stop)ed,
        
        Win32::GetLastError returns errno #997, which means "Overlapped
I/O operation is in progress" (ERROR_IO_PENDING).

        I've tried with services with NO dependencies on other services,
and the problem is the same as above.

        What should i do to fix this problem?

        Any clue?

Regards,


--
Esteban < emaringolo [at] linux.org.ar >
---
# �How do you get an elephant into a matchbox?
# You first take out all the match-sticks, then you get it in.
 



        
_______________________________________________
Perl-Win32-Admin mailing list [EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to