|
View previous topic :: View next topic |
Author |
Message |
msmith
Joined: 25 Mar 2003 Posts: 15
|
Posted: Thu May 01, 2003 9:03 am Post subject: |
|
|
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 |
|
Back to top |
|
|
msmith
Joined: 25 Mar 2003 Posts: 15
|
Posted: Thu May 01, 2003 9:24 am Post subject: |
|
|
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%
I also tried with the StartProgram HMS command.
Thanks |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Thu May 01, 2003 11:01 am Post subject: |
|
|
>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 |
|
Back to top |
|
|
msmith
Joined: 25 Mar 2003 Posts: 15
|
Posted: Fri May 02, 2003 6:57 am Post subject: |
|
|
What's the differnece between the StartProgram command and the ExecuteProgram comman, and what one would be better to use to launch a batch file.
Thanks |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Fri May 02, 2003 12:39 pm Post subject: |
|
|
>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 |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|