in reply to How to query/stop/start Windows services?

Maybe the easiest is to just hack up a system() call to run the appropriate "sc" command ?

That being said, I just successfully installed Win32::Service via PPM... what version of AS Perl were you running ? (Mine is 5.8.6). Do you have ActiveState setup as a repository ?

  • Comment on Re: How to query/stop/start Windows services?

Replies are listed 'Best First'.
Re^2: How to query/stop/start Windows services?
by adam2005 (Initiate) on Dec 16, 2005 at 05:03 UTC
    I have version 5.6.1 of AS Perl and the repository it's set to is 'ActiveState PPM2 Repository' and also 'ActiveState package Repository'. Dooes upgrading my perl version to 5.8.6 make a difference??
      Dooes upgrading my perl version to 5.8.6 make a difference??

      Sorry, I wouldn't know. Shortly after I upgraded to 5.8, I dumped 5.6 and never looked back. If you're stuck w/ 5.6, you'll likely need to either get a VC++ environment and build from scratch from CPAN sources, or try the other suggestion (i.e., system("sc stop $service"); ). You might check AS's PPM page for instructions on accessing older version repositories.

      However, if you have the option, I'd highly recommend upgrading to 5.8.6+. 5.6 is getting a bit long in the tooth at this point, and you'll find an increasing number of modules now require 5.8, in part because it provides so many feature enhancements.