> Is possible to start-restart IIS from a remote machine?

It is possible.

There is a MFC API for starting/stop/restarting NT services:

SC_HANDLE OpenService(
    SC_HANDLE mgr,            // handle to SCM Database
    LPCTSTR      svc_name,    // Name of Service
    DWORD        access_mod     // access
);


// restart
svc = OpenService(hSCM, name, SERVICE_START | SERVICE_QUERY_STATUS |
SERVICE_STOP);

// start
svc = OpenService(hSCM, name, SERVICE_START | SERVICE_QUERY_STATUS);

And the calling the StartService or ControlService methods on the handler.

I've attached the API for these methods in case you don't have access to
them.

I believe what you'd need to do is write a service that was setup as manual
on 
your service that did the stop/start of IIS and then write an interface that

allowed you to run that service over the web.



---
Michael Wentzel
Software Developer
<A HREF="http://www.aswethink.com">Software As We Think</A>
<A HREF="mailto:[EMAIL PROTECTED]">Michael Wentzel</A>

ServiceControls.doc

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to