Remote Monitoring & Management Help

Script Host

Where Windows Script host is not registered correctly on a system running the Advanced Monitoring Agent when attempting to run Script Checks and / or Automated Tasks the scripts may fail to run.

Investigative Steps

Write a very simple script, place it in the scripts directory of the agent installation directory - by default C:\Program Files\Advanced Monitoring Agent\scripts - then attempt to run the script from the command line.

  1. Create a basic VBScript
  2. Save this as name.vbs in C:\Program Files\Advanced Monitoring Agent\scripts or C:\Program Files (x86)\Advanced Monitoring Agent\scripts
  3. Open a command prompt
    1. Windows + R
    2. Enter cmd
    3. OK
  4. Navigate to the Advanced Monitoring Agent installation directory, by default C:\Program Files\Advanced Monitoring Agent\ or C:\Program Files (x86)\Advanced Monitoring Agent\
  5. C:\>cd C:\Program Files (x86)\Advanced Monitoring Agent\

  6. Run the following command:
  7. cscript task_start.js 999 test.vbs

  8. Where there is an issue with the Script Host, an error similar to the below is returned
  9. Can't find script engine "JScript" for script

Resolution

This problem can be resolved from a command line interface with administrator (or elevated) permissions by running the following commands:

   regsvr32 %systemroot%\system32\vbscript.dll
regsvr32 %systemroot%\system32\jscript.dll
regsvr32 %systemroot%\system32\dispex.dll
regsvr32 %systemroot%\system32\scrobj.dll
regsvr32 %systemroot%\system32\scrrun.dll
regsvr32 %systemroot%\system32\wshext.dll
regsvr32 %systemroot%\system32\wshom.ocx

Retry the investigation steps, if the problem persists, Windows Script Host may have to be reinstalled with instructions and the required installation files available from: http://support.microsoft.com/kb/949140

Please note we are not responsible for the content of external sites.