tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wentzel <Michael.Went...@aswethink.com>
Subject RE: Start IIS
Date Fri, 26 Jan 2001 14:11:30 GMT
> 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:wentzel@aswethink.com">Michael Wentzel</A>


Mime
View raw message