Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[green]
'==========================================================='
' NAME: NotifyESEUTILCompletion.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: http://www.thespidersparlor.com
' DATE : 9/28/2007
' COPYRIGHT (c) 2007 All Rights Reserved
'
' COMMENT: Notifies via SMTP email when the ESEUTIL process
' has stopped.
'
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT
' WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
' INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
' PURPOSE.
'
' IN NO EVENT SHALL THE SPIDER'S PARLOR AND/OR ITS
' RESPECTIVE SUPPLIERS BE LIABLE FOR ANY SPECIAL,
' INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
' WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
' WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
' TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
' THE USE OR PERFORMANCE OF THIS CODE OR INFORMATION.
'
' YOU ARE FREE TO USE AND SHARE THIS SCRIPT PROVIDED YOU
' ONLY ALTER THE SECTION MARKED FOR EDIT AND PROVIDED
' YOU RETAIN THIS HEADER.
'
' THIS SCRIPT AND MANY MORE ARE INCLUDED IN
' THE ADMIN SCRIPT PACK
' PUBLISHED BY THE SPIDER'S PARLOR.
' WORK SMARTER, NOT HARDER.
'
'==========================================================='
'EDIT THE FOLLOWING SECTION
' Set the company specific information[/green]
strFrom = "[red]Administrator@company.com[/red]"
[green]' Set the SMTP server IP[/green]
strMyIP = "[red]192.168.16.2[/red]"
[green]' Where do you want the message to be delivered
' Use semicolons to seperate multiple addresses[/green]
strTo = "[red]youremailaddress@company.com[/red]"
[green]'END EDIT SECTION[/green]
domain = Right(strFrom,InStrRev(strFrom,"@")+1)
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Do Until IsRunning = "No"
IsRunning = CheckProcess
Loop
Report = "ESEUTIL completed for " & domain & " at " & Now
' Set the visual basic constants as they do not exist within VBScript.
' Do not set your smtp server information here.
Const cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing", _
cdoSendUsingPort = 2, _
cdoSMTPServer = "http://schemas.microsoft.com/cdo/configuration/smtpserver"
' Create the CDO connections.
Dim iMsg, iConf, Flds
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
' SMTP server configuration.
With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
' Set the SMTP server address here.
.Item(cdoSMTPServer) = strMyIP
.Update
End With
' Set the message properties.
With iMsg
Set .Configuration = iConf
.To = strTo
.From = strFrom
.Subject = domain & " Information Store(s) Needs Immediate Attention"
.TextBody = Report
End With
'Send the message.
iMsg.Send
Function CheckProcess
AppFound = "No"
Set colProcessList = objWMIService.ExecQuery("Select * from Win32_Process")
For Each objProcess in colProcessList
If objProcess.Name = "[blue]eseutil[/blue].exe" Then
AppFound = "Yes"
End If
Next
CheckProcess = AppFound
End Function