There is a tool I have installed on my machine - I believe it came with
the Windows 2000 Resource kit (of sorts... obtained via TechNet) that
gives a lot more data.

It's called 'netsvc'. Here's what it outputs:

C:\>netsvc
Controls and displays the status of services.

NETSVC servicename \\computername /command

   servicename  Name of the service
   computername Name of the computer to administer.
   /command     One of the following:
                /query    Queries the status of the service.
                /start    Starts the service.
                /stop     Stops the service.
                /pause    Pauses the service.
                /continue Starts the paused service.
                /list     Lists installed services (omit servicename)

Example: NETSVC server  \\joes486 /query
Example: NETSVC "Clipbook Server" \\popcorn /stop
Example: NETSVC alerter \\joes486 /pause
Example: NETSVC /list \\joes486

Arguments are allowed in any order.

When I do this: 'netsvc apache2 \\dash /query' it tells me this:

Service is running on \\dash

This tool also allows for remote administration (assuming the user that
runs PHP (system? iuser_whatever?) has rights to the other machine).

Hope this helps,

-Dash

God is not dead!  He's alive and autographing bibles at Cody's

On Tue, 14 Jan 2003, Ignatius Reilly wrote:

> net start outputs a list of *running* services.
>
> Or do you mean other service status information (automatic/ manual), etc.? I
> don't know. Not with the DOS net tools, AFAI.
>
> Ignatius
> ____________________________________________
> ----- Original Message -----
> From: "Paul Menard" <[EMAIL PROTECTED]>
> To: "Ignatius Reilly" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, January 14, 2003 7:24 PM
> Subject: Re: [PHP-WIN] Windows Service interactions with PHP
>
>
> > Yes this does work but how do I simply destermine the
> > status of the service without actually starting it?
> >
> > Obviosly is the service is running and you call
> >
> > --- Ignatius Reilly <[EMAIL PROTECTED]> wrote:
> > > You can access the command line with the backtick
> > > operator:
> > >
> > > <?php
> > >
> > >  // restart the servers
> > >  `net stop mysql` ;    // backtick, not quote
> > >  `net stop apache` ;
> > >  `net start mysql` ;
> > >  `net start apache` ;
> > >
> > > // To access the running services:
> > > `net start > "file_to_parse.txt"` ;
> > >
> > > ?>
> > >
> > >
> > > En espérant que cela aide
> > > Ignatius
> > > ____________________________________________
> > > ----- Original Message -----
> > > From: "Paul Menard" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, January 14, 2003 5:10 PM
> > > Subject: [PHP-WIN] Windows Service interactions with
> > > PHP
> > >
> > >
> > > > All,
> > > >
> > > > I' converting a Web site from ASP to PHP. One of
> > > the
> > > > last issues I am working on is converting the ASP
> > > page
> > > > that will show the status of a specific Service.
> > > >
> > > > This page also allows the Admin level user to
> > > > stop/start the service.
> > > >
> > > > What is the 'best' way to code this in PHP and/or
> > > > Perl?
> > > >
> > > > Paul
> > > >
> > > > __________________________________________________
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> > > now.
> > > > http://mailplus.yahoo.com
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit:
> > > http://www.php.net/unsub.php
> > > >
> > > >
> > >
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > http://mailplus.yahoo.com
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to