I use plink.exe to launch a file on my asterisk phone server. I use it in the following format.
C:\"location"\plink.exe -pw PASSWORDUSER@HOST /var/spool/asterisk/tmp/SHell.sh
Also I can run it this way
C:\"location"\plink.exe -pw PASSWORDUSER@HOST -m C:\location\file.txt Where the file.txt has a list of commands to be executed on the remote phone server.
I can run this either way and it works. I can test the command in the NPM enterface and it works. But when I log off and try to get the alert to launch without me logged in to Solarwinds or anything plink fires and then just stops. I have run this command as a generic user with no rights and it works I have run it as me and it works but not from Solarwinds.
SO I wrote a VBscript
Set WSHShell = WScript.createobject("WScript.Shell")
WSHShell.Run "C:\asterisk\plink.exe -pw PASSWORDUSER@HOST"
WScript.Sleep 1000
WshShell.SendKeys "cp /var/spool/asterisk/tmp/call/* /var/spool/asterisk/tmp{enter}"
WScript.Sleep 1000
WshShell.SendKeys "chown asterisk:asterisk /var/spool/asterisk/tmp/hello-world.call{enter}"
WScript.Sleep 1000
WshShell.SendKeys "mv /var/spool/asterisk/tmp/hello-world.call /var/spool/asterisk/outgoing{enter}"
WScript.Sleep 1000
WshShell.SendKeys "exit{ENTER}"
And then i tried this. The script also runs from anyuser as long as the computer is on our network. no problem. But solarwinds cannot seem to complete the run. Plink.exe shows up in task manager and then it just sits never completeing the commands.
Any ides?