Re: enumerate IIS dependent services

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 02/05/04


Date: Thu, 5 Feb 2004 04:45:25 -0800

You can use WMI to query for dependent services. Problem with stopping
services with WMI is that the .StopService() call returns BEFORE the service
has completed stopping -- so even if you stop the dependent services, you
can still fail the parent service because the child hadn't really stopped
yet.

Better yet, use "NET STOP /y IISADMIN" by using WshShell.Run in a script.
It'll stop IIS and dependent services, guaranteed.

-- 
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Jack S." <anonymous@discussions.microsoft.com> wrote in message
news:1739169F-DBA2-45FC-8EA9-BC48242C382A@microsoft.com...
I would like to programmatically using vbscript to stop and restart IIS
service.  Before stopping IIS service, I need to stop its dependent service
like SMTP.  Is ther a way for me to find all depent services of IIS using
script?  Thanks.


Relevant Pages

  • Re: Error 1332: No mapping between account names and security IDs was done - after dcpromo
    ... > IIS has to be installed after a machine is promoted to DC status. ... then the promotion gets rid of the machine local ... > just follow the planning guides and only install IIS after dcpromo. ... >> All dependent services are running. ...
    (microsoft.public.windows.server.security)
  • scripting IIS settings?
    ... can IIS be added/removed via script? ... (either WSH or WMI)? ... can an IIS web site be created/configured via script? ...
    (microsoft.public.windows.server.scripting)
  • Re: scripting IIS settings?
    ... can IIS be added/removed via script? ... (either WSH or WMI)? ... can an IIS web site be created/configured via script? ...
    (microsoft.public.windows.server.scripting)
  • RE: scripting IIS settings?
    ... can IIS be added/removed via script? ... (either WSH or WMI)? ... can an IIS web site be created/configured via script? ...
    (microsoft.public.windows.server.scripting)