httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koen Vingerhoets" <koen.vingerho...@ubench.com>
Subject RE: IBM HTTP - Win 2000 - http alive?
Date Tue, 23 Jul 2002 16:35:43 GMT
Hi!

Thanks for all the help!
After some reading in the WSH links today I made this:

strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
& strComputer & "\root\cimv2")
Set colListOfServices = objWMIService.ExecQuery ("Select * from
Win32_Service Where Name = 'IBMHTTPServer'")
For Each objService in colListOfServices

	If (objService.State <> "Started") Then

    	objService.StartService()

   	 Set objEmail = CreateObject("CDO.Message")
         objEmail.From = "info@ubench.com"
         objEmail.To = "koen.vingerhoets@ubench.com"
         objEmail.Subject = "UBench02 error report"
         objEmail.Textbody = "Crap!! The HTTP Server crashed!! However, I
noticed that and most likely restarted it."
       objEmail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
	 objEmail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "my.smtp.be"
	 objEmail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
	 objEmail.Configuration.Fields.Update
	 objEmail.Send
	 Set objEmail = nothing
	End If
Next


I tried to loop to make sure that it worked but all it did was sending 250
mail messages :s
If there are stupidities in it, let me know.  I have no VB knowledge :(

Met vriendelijke groet,

Koen Vingerhoets




-----Original Message-----
From: Jeff White [mailto:jlwpc1@earthlink.net]
Sent: 22 July 2002 23:13
To: users@httpd.apache.org
Subject: Re: IBM HTTP - Win 2000 - http alive?



> I was wondering how I could check
> whether the HTTP server is still running
> under Windows 2000.

Use built-in Windows Script

Windows Script
http://msdn.microsoft.com/scripting


Introduction to Windows Scripting
http://www.winguides.com/article.php?id=2

Scripting 101
A 4 part series on how to create and structure WSH scripts by Bob
Wells
http://www.winnetmag.com/Articles/Index.cfm?ArticleID=5410
http://www.winnetmag.com/Articles/Index.cfm?ArticleID=5505
http://www.winnetmag.com/Articles/Index.cfm?ArticleID=5683
http://www.winnetmag.com/Articles/Index.cfm?ArticleID=7112

VBScript Primer
http://www.microsoft.com/technet/prodtechnol/windows2000serv/maintain/
optimize/script/netvbscr.asp

System Administration Scripting Guide
http://www.microsoft.com/downloads/release.asp?ReleaseID=38942&area=se
arch&ordinal=2


Services
http://www.microsoft.com/technet/scriptcenter/services/default.asp

TechNet Script Center
http://www.microsoft.com/technet/scriptcenter/default.asp


Jeff






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message