Service Recovery Does Not Execute Batch or Script Files

ID: Q247929


The information in this article applies to:
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Datacenter Server
  • Microsoft Windows 2000 Professional
  • Microsoft Windows 2000 Server


SYMPTOMS

When you try to use the service recovery functionality in Windows 2000 Services Manager to execute a batch or script file, you may be unable to do so.


CAUSE

This issue can occur if you do not specify an appropriate program to execute the script or batch file.


RESOLUTION

To work around this issue:

  1. Click Start, click Programs, and then click Administrative Tools.


  2. Click Services, and then double-click the appropriate service.


  3. Click Recovery, and then select the appropriate response from either the First failure box, the Second failure box, or the Subsequent failures box.


  4. Type in the appropriate executable followed by the full path and file name of the file you want to execute.

    NOTE: If you want to execute a batch file, type the following command

    forcedos.exe my file.bat

    where my file is your file name. If you want to execute a script file, type one of the following commands for Microsoft Visual Basic scripts

    • wscript.exe my script.vbs

      , where my script is the name of your script.


    • wscript.exe my script.js

      for Java scripts.




  5. Click OK, and then close Services Manager.



STATUS

This behavior is by design.


MORE INFORMATION

The Windows 2000 Service Control Manager is a Microsoft Management Console (MMC) snap-in. This new feature replaces the Control Panel/Services functionality used in previous versions of Windows NT and provides the capability of customizing recovery options for a service that has failed. This implementation requires very little overhead by monitoring EventLog entries instead of polling service status.

For more information about using Windows 2000 Services Manager, consult the Using Services topic in Windows 2000 Help.

Additional query words:

Keywords : kbenv kbtool
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: January 11, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.