Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send email alert by batch script

Status
Not open for further replies.

Menon181

Programmer
Aug 27, 2015
13
IN
Hi,
I am using below command for monitoring the service. And it has to sent email alert if Service START.


for /F "tokens=3 delims=: " %%H in ('sc query "MY SERVICE" ^| findstr " STATE"') do (
if /I "%%H" NEQ "RUNNING" (
net start "MY SERVICE"
))
Regards
Menon
 
You could try and switch to powershell and use it to send an email. But this is probably not the correct forum to discuss this.


Specialist in creating custom applications for the Micros POS range: 3700, 9700, Simphony FE, Simphony. SIM Scripts, Data Exports, Simphony extension applications, API Creation and integration. If you need anything please contact me via my website
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top