NetXMS Support Forum

English Support => General Support => Topic started by: SmEed on February 10, 2016, 12:50:06 PM

Title: Action - Execute command via remote agent
Post by: SmEed on February 10, 2016, 12:50:06 PM
Hello!

I am trying to run an external program (cmd.exe) whenever a threshold is reached.

I added an Actions Configuration called notepad of type 'Execute command on remote node via agent',
and in the agent's configfile (etc/nxagentd.conf) i add 'ActionShellExec = notepad:cmd.exe /C pause'.

But, it does not work.

Can anyone give me a hint?

THX! ;)
Title: Re: Action - Execute command via remote agent
Post by: SmEed on February 10, 2016, 01:35:05 PM
Correction!

The Task is running, but i can't see it in the current user session...

:(
Title: Re: Action - Execute command via remote agent
Post by: Alex Kirhenshtein on February 10, 2016, 04:12:03 PM
Agent by default is running as windows service and can't interact with the GUI. In older version os windows (before 7) you can enabled "Interact with GUI" option in service manger, but for newer ones – you'll have to run agent as application, not as service.
You can add it to autorun, and if you want to hide console window – start it with "-H" command line option.