Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Running Batch Files in Service Recovery

  • 15-06-2007 3:07pm
    #1
    Registered Users, Registered Users 2 Posts: 816 ✭✭✭


    Hi,
    I'm trying to set up an event on a 2003 server whereby if a particular service stops i'm notified by email.

    I've set up a batch file which sends me an SMTP email message and now i'm trying to link it to the 'Recovery' -> 'First Failure' -> 'Run a Program' in 'Services'

    As batch files are (apparently) not real programs, i've had to set the 'program to be run' as 'c:\WINDOWS\system32\forcedos.exe' and the 'parameters' as 'c:\myscriptfolder\mybatchfile.bat' as outlined in MS Article: 247929.

    I've tested the batch file and it sends me a mail if i double-click on it, but there's something wrong (i think) with the way i've set up in the Recovery options in Services.

    Anyone have any ideas?

    Thanks.


Comments

  • Registered Users, Registered Users 2 Posts: 21,492 ✭✭✭✭Alun


    cmd.exe /c mybatchfile.bat


  • Registered Users, Registered Users 2 Posts: 816 ✭✭✭dr strangelove


    cmd.exe /c mybatchfile.bat

    yeah, tried that and it didn't work either.

    i can run the batch file, and i can even enter the address and name of the batch file in the command prompt, (eg. d:\smtpscripts\aservicejuststopped.bat) and get the email notification, so i'm just wondering now if stopping a service manually would still trigger the event, as opposed to the service stopping unexpectedly.


  • Registered Users, Registered Users 2 Posts: 7,314 ✭✭✭Nietzschean


    manually stopping a service i'm about 90% sure will not trigger a service failure event(otherwise automatically restart service would kick in), it would also be silly to trigger one too..


  • Registered Users, Registered Users 2 Posts: 816 ✭✭✭dr strangelove


    Hmm, yeah, that's pretty much my feeling now.....

    <sits back and quietly hopes that McAffee Updater service unexpectedly stops soon so i can test my smtp email script>


Advertisement