<?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[Questions]]></title><description><![CDATA[<p dir="auto"><strong>Good, I have two questions for you,</strong><br />
1- How can I run a script as an administrator from trigger cmd? What happens is that when I run it as an administrator myself I do not give me errors and when I do it with trigger cmd an application does not close because an access error deneged</p>
<p dir="auto">2- Therefore, I would like to know how I can run a script with trigger cmd but that looks on the screen the CMD window to see what is the error in the following script's developing, since I currently realize that I do not know that I do not know It develops one or two steps of it, I am new to all this and it helps me a lot to read the error codes to look for them on Google.</p>
<p dir="auto">By the way, use Windows.</p>
<p dir="auto">Thank you.</p>
]]></description><link>https://www.triggercmd.com/forum/topic/1453/questions</link><generator>RSS for Node</generator><lastBuildDate>Mon, 09 Nov 2026 12:25:26 GMT</lastBuildDate><atom:link href="https://www.triggercmd.com/forum/topic/1453.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 04 Jul 2021 10:24:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Questions on Sat, 24 Feb 2024 16:47:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/russ" aria-label="Profile: Russ">@<bdi>Russ</bdi></a> I'm trying to get this to work on an old (out of date) Win10 micro-PC that's x86.</p>
<p dir="auto">{"trigger":"Users","command":"schtasks.exe /run /tn users","ground":"background","voice":"users"},</p>
<p dir="auto">Here's the command in the JSON file.  If I run the schtasks from a command prompt, it works.  If I try to trigger this, it doesn't.  Am I missing some syntax?</p>
<p dir="auto">(The goal is to run a batch file at c:\ which deletes a file in Program Files and replaces it with a backup.)</p>
<p dir="auto">EDIT:  Just needed to change it to Foreground <img src="https://www.triggercmd.com/forum/assets/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f926-1f3fb.png?v=6297cc46437" class="not-responsive emoji emoji-emoji-one emoji--person_facepalming_light_skin_tone" style="height:23px;width:auto;vertical-align:middle" title="🤦🏻" alt="🤦🏻" />‍<img src="https://www.triggercmd.com/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/2642.png?v=6297cc46437" class="not-responsive emoji emoji-android emoji--male_sign" style="height:23px;width:auto;vertical-align:middle" title="♂" alt="♂" />️</p>
]]></description><link>https://www.triggercmd.com/forum/post/7700</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/7700</guid><dc:creator><![CDATA[Xander]]></dc:creator><pubDate>Sat, 24 Feb 2024 16:47:12 GMT</pubDate></item><item><title><![CDATA[Reply to Questions on Sun, 04 Jul 2021 18:41:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/tony-jim%C3%A9nez" aria-label="Profile: Tony-Jiménez">@<bdi>Tony-Jiménez</bdi></a>, here's one way to run elevated commands to run "As administrator" via TRIGGERcmd:</p>
<p dir="auto">Open Task Scheduler and create a task called "AdminScript" like this:</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1625423486643-4b8695a2-4c07-40c6-a789-f5f4bd0e3e2e-image.png" alt="4b8695a2-4c07-40c6-a789-f5f4bd0e3e2e-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">This is what the Action settings look like:</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1625423448894-945218d8-4c07-4e44-b348-e6c1ce901911-image.png" alt="945218d8-4c07-4e44-b348-e6c1ce901911-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">On the General Tab, click this "Run with highest privileges" checkbox.  That basically tells it to run "As administrator", aka elevated.</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1625423523010-4681b4b0-33fd-4fa9-8171-aa836f49506e-image.png" alt="4681b4b0-33fd-4fa9-8171-aa836f49506e-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Make your TRIGGERcmd command run this:</p>
<pre><code>SCHTASKS.EXE /RUN /TN "AdminScript"
</code></pre>
<p dir="auto">This is my test script:</p>
<pre><code>@echo off
net session &gt; NUL 2&gt;&amp;1
IF ERRORLEVEL 1 GOTO not_elevated
echo This script ran WITH elevated privilages.
goto end
:not_elevated
echo This script ran WITHOUT elevated privilages.
:end
start notepad
</code></pre>
<p dir="auto">These are the contents of d:\tools\script.log:</p>
<pre><code>This script ran WITH elevated privilages.
</code></pre>
<p dir="auto">I see that notepad ran "As administrator" because it has Elevated = Yes in Task Manager.  I had to add the Elevated column to see that.<br />
<img src="/forum/assets/uploads/files/1625423768942-dd214b55-7a69-405c-b117-213a1bcf01a0-image.png" alt="dd214b55-7a69-405c-b117-213a1bcf01a0-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://www.triggercmd.com/forum/post/4229</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/4229</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Sun, 04 Jul 2021 18:41:20 GMT</pubDate></item></channel></rss>