<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Automatically Restarting a Program with GUI]]></title><description><![CDATA[<p dir="auto">I have NetXMS setup to alert me if a particular program stops running but I'd also like it to restart the program automatically when it detects that it is not. I was able to configure this action successfully but NetXMS is running as a service so it restarts the program as a background process. I need the program's GUI to be presented to the logged in user. I understand this is possible by setting up a subagent running it as the logged in user and connecting it to the main agent running as a service but it isn't clear to me how to do this exactly. The documentation only mentions it briefly. Can anyone offer clarification on creating a subagent running as a different user? Is there a better way to restart a program with a GUI than this method?</p>
]]></description><link>https://forum.netxms.org/topic/6845/automatically-restarting-a-program-with-gui</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 12:52:17 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/6845.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 06 Jan 2021 14:53:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Automatically Restarting a Program with GUI on Fri, 08 Jan 2021 15:31:05 GMT]]></title><description><![CDATA[<p dir="auto">Calling for the instance as a variable in the action is what I was missing. That did the trick, thanks!</p>
]]></description><link>https://forum.netxms.org/post/29228</link><guid isPermaLink="true">https://forum.netxms.org/post/29228</guid><dc:creator><![CDATA[bquiggle]]></dc:creator><pubDate>Fri, 08 Jan 2021 15:31:05 GMT</pubDate></item><item><title><![CDATA[Reply to Automatically Restarting a Program with GUI on Wed, 06 Jan 2021 23:41:42 GMT]]></title><description><![CDATA[<p dir="auto">There are multiple ways to do that, I'd probably use instance in action name:</p>
<ol>
<li>configure 2 actions on the agent: StartA, StartB</li>
<li>Create 2 DCIs - Process.Count(A) and Process.Count(B) with threshold "&lt; 1" on both (or any other way how you detect that process is down), set instance to "A" and "B" respectively (in thresholds tab, will be used in action name) and some activation event (can be the same).</li>
<li>handle this event in EPP with "Execute command on remote node via agent" action, as agent action name put something "Start%&lt;instance&gt;"</li>
</ol>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000005382-Screenshot_2021-01-07_at_01.39.47.png" alt="Screenshot 2021-01-07 at 01.39.47.png" class="img-markdown  img-fluid" width="710" height="1080" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000005383-Screenshot_2021-01-07_at_01.40.23.png" alt="Screenshot 2021-01-07 at 01.40.23.png" class="img-markdown  img-fluid" width="960" height="536" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000005384-Screenshot_2021-01-07_at_01.40.47.png" alt="Screenshot 2021-01-07 at 01.40.47.png" class="img-markdown  img-fluid" width="710" height="152" /></p>
]]></description><link>https://forum.netxms.org/post/29213</link><guid isPermaLink="true">https://forum.netxms.org/post/29213</guid><dc:creator><![CDATA[alk]]></dc:creator><pubDate>Wed, 06 Jan 2021 23:41:42 GMT</pubDate></item><item><title><![CDATA[Reply to Automatically Restarting a Program with GUI on Wed, 06 Jan 2021 19:03:07 GMT]]></title><description><![CDATA[<p dir="auto">A quick follow-up question: can I use a single event processing item to monitor and restart multiple different programs on the same node?</p>
<p dir="auto">I want to ensure that program A and B are always running. Is it possible to use filtering scripts in event processing to filter out actions based on certain criteria? Can I use the same processing item to say "if program A stops, run action to restart program A and do NOT run action to restart program B" or do I need to create two different processing items for this?</p>
]]></description><link>https://forum.netxms.org/post/29212</link><guid isPermaLink="true">https://forum.netxms.org/post/29212</guid><dc:creator><![CDATA[bquiggle]]></dc:creator><pubDate>Wed, 06 Jan 2021 19:03:07 GMT</pubDate></item><item><title><![CDATA[Reply to Automatically Restarting a Program with GUI on Wed, 06 Jan 2021 16:01:17 GMT]]></title><description><![CDATA[<p dir="auto">That worked! Thanks for the help!</p>
]]></description><link>https://forum.netxms.org/post/29211</link><guid isPermaLink="true">https://forum.netxms.org/post/29211</guid><dc:creator><![CDATA[bquiggle]]></dc:creator><pubDate>Wed, 06 Jan 2021 16:01:17 GMT</pubDate></item><item><title><![CDATA[Reply to Automatically Restarting a Program with GUI on Wed, 06 Jan 2021 15:15:25 GMT]]></title><description><![CDATA[<p dir="auto">Sample config:</p>
<pre><code>LogFile=c:\netxms\logs\nxagentd.log

[EXT:XYZ]
LogFile=c:\netxms\logs\nxagentd.xyx.log

Action=StartApp:c:\...\app.exe
</code></pre>
<p dir="auto">Core agent (which runs as service) will read main section, and second instance of the agent will read EXT: section instead.<br />
Second instance should be started in the user's session with additional command line arguments: -G EXT:XYZ -H<br />
-G should match EXT: section in the config file and -H will hide agent's console window from user.</p>
<p dir="auto">You can add agent to autostart using reg command (or in any other way):</p>
<pre><code>reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v NetXMSExternalAgent /t REG_SZ /d "C:\NetXMS\bin\nxagentd.exe -c C:\NetXMS\etc\nxagentd.conf -G EXT:XYZ -H" /f
</code></pre>
]]></description><link>https://forum.netxms.org/post/29210</link><guid isPermaLink="true">https://forum.netxms.org/post/29210</guid><dc:creator><![CDATA[alk]]></dc:creator><pubDate>Wed, 06 Jan 2021 15:15:25 GMT</pubDate></item></channel></rss>