I don't know if it's possible to do this, but I was hoping you can tell me.
I can use the NET SEND command in a batch file to send windows popup message to a client. example:
NET SEND computername1 The server is down again!
the client will recieve a popup window with the message, but here's my problem.
I'd like to be able to use the Hostmonitor variables in the message, so it says what server/test failed and possibly when.
I know there is an API for the NET SEND command. does host monitor support NET SEND as an action, and if not, are there any plans to support it in the future?
Thanks.
and the user at the
Sending a Popup to a client
>does host monitor support NET SEND as an action
You can execute ANY external program using "Execute external program" action. You can use macro variables in the command line, so I don't see any problem. If you starts program from BAT/CMD file, use %1, %2, etc to pass parameters (e.g. "NET SEND computer1 %1 %2 %3 %4").
>also, I tried to use an HMS script, but it didn't seem to work, here's the script I used:
ExecuteProgram NET SEND pcname %TestName% %SimpleStatus% on %DateTime%
You missed "TimeToWait" parameter. If script doesn't work, please check system log. HostMonitor records message that explain what's wrong.
Regards
Alex
You can execute ANY external program using "Execute external program" action. You can use macro variables in the command line, so I don't see any problem. If you starts program from BAT/CMD file, use %1, %2, etc to pass parameters (e.g. "NET SEND computer1 %1 %2 %3 %4").
>also, I tried to use an HMS script, but it didn't seem to work, here's the script I used:
ExecuteProgram NET SEND pcname %TestName% %SimpleStatus% on %DateTime%
You missed "TimeToWait" parameter. If script doesn't work, please check system log. HostMonitor records message that explain what's wrong.
Regards
Alex
>What's the differnece between the StartProgram command and the ExecuteProgram comman
Its described in manual:
StartProgram starts external program and continue to execute the script (do not wait until external program will terminate)
ExecuteProgram executes external program, waits until external program is terminated, and continues to execute the script. If parameter <TimeToWait> is not equal to 0, HostMonitor will "kill" the external application when the application is not finished within the given timeout (time defined in milliseconds).
Be careful with this command, HostMonitor stops monitoring when executes external program by this command.
>and what one would be better to use to launch a batch file
It depends on your needs
Regards
Alex
Its described in manual:
StartProgram starts external program and continue to execute the script (do not wait until external program will terminate)
ExecuteProgram executes external program, waits until external program is terminated, and continues to execute the script. If parameter <TimeToWait> is not equal to 0, HostMonitor will "kill" the external application when the application is not finished within the given timeout (time defined in milliseconds).
Be careful with this command, HostMonitor stops monitoring when executes external program by this command.
>and what one would be better to use to launch a batch file
It depends on your needs
Regards
Alex