Script Host
If the Windows Script host is not registered correctly on a system running the Windows Agent when attempting to run Script Checks and / or Automated Tasks, the scripts may fail to run.
Investigative Steps
Write a 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.
- Create a basic VBScript
- Save this as name.vbs in C:\Program Files\Advanced Monitoring Agent\scripts or C:\Program Files (x86)\Advanced Monitoring Agent\scripts
- Open a command prompt
- Windows + R
- Enter cmd
- OK
- Navigate to the Advanced Monitoring Agent installation directory, by default C:\Program Files\Advanced Monitoring Agent\ or C:\Program Files (x86)\Advanced Monitoring Agent\
- Run the following command:
- Where there is an issue with the Script Host, an error similar to the below is returned
C:\>cd C:\Program Files (x86)\Advanced Monitoring Agent\
cscript task_start.js 999 test.vbs
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.