I've recently started working with HostMonitor and wanted to make a test which will check the Defragmentation level of one of the local HDD's, and will alert me if I should defragment one of them. The thing is that I didn't find such an option within host monitor and made a small VBS file using WMI. I wanted to run the script as an Active Script test in Host Monitor, and made the .vbs file like those on the examples, the thing is, that Host Monitor, it seems - and correct me if I'm wrong, doesn't support Active Scripts with WMI.
When I clicked 'Test' in the place where I choose the file - when I create the Test. I got the strange error which got me to the conclusion above:
The strange thing is that WSCript is a Global variable, witch allows you to use WMI within the VBS. and the strangest off all is that if I run the code not in the syntax of the HostMonitor, alone - on windows it works (I added just for the experiment a WSCript.Echo message)Microsoft VBScript Runtime Error,
Variable is undefined "WSCript"
And there is more, the truth is that I really need this option because I wanted to use a VBS that checks to fined any running process that contains a given string (unlike host monitor who checks to find the whole string) and turn some test to good condition if it's running and bad if not. I also tried doing so with the WMI test method, but I couldn't figure this out.
Thx in advance,
Avi