<?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[How to Run Commands as Administrator]]></title><description><![CDATA[<p dir="auto">Hey Guys -</p>
<p dir="auto">Just found this utility today and playing with it with my existing automation setup.  Quick question, though.  The first thing I tried to do is to have the ability to start / stop Windows (10) services using "net start service).  When testing, it failed to start the service yet know the command is correct.  Pretty sure it's because the execution requires elevation.  What can I do (if anything) to achieve this?</p>
<p dir="auto">I've already installed the background service and when looking in the forum for an answer, saw the example of using "sc start service" therefore tried it instead, but it didn't work either.  The system is Windows 10 x64 with UAC disabled and I obviously have full admin rights.</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://www.triggercmd.com/forum/topic/100/how-to-run-commands-as-administrator</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Mar 2026 01:33:57 GMT</lastBuildDate><atom:link href="https://www.triggercmd.com/forum/topic/100.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 25 Nov 2017 19:10:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to Run Commands as Administrator on Sun, 04 Jul 2021 18:42:40 GMT]]></title><description><![CDATA[<p dir="auto">@bzowk ,</p>
<p dir="auto">That should have worked.  Background commands are elevated commands by default because they run in the context of the Windows service that runs as Local System.</p>
<p dir="auto">I have a background command called "Restart Print Spooler" that runs:</p>
<pre><code>sc stop spooler &amp; sc start spooler
</code></pre>
<p dir="auto">I just tested it on my Win10 box and it worked.  I have UAC turned on though, so maybe that's the difference.</p>
<p dir="auto">EDIT 7/4/21:<br />
Check out this solution too:  <a href="https://www.triggercmd.com/forum/topic/1453/questions/2">https://www.triggercmd.com/forum/topic/1453/questions/2</a></p>
]]></description><link>https://www.triggercmd.com/forum/post/303</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/303</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Sun, 04 Jul 2021 18:42:40 GMT</pubDate></item><item><title><![CDATA[Reply to How to Run Commands as Administrator on Sat, 25 Nov 2017 19:25:45 GMT]]></title><description><![CDATA[<p dir="auto">OK, I tried a few things and found the below workaround using a utility I use with CPAU.  It works, but if there's a better way; please let me know. <img src="https://www.triggercmd.com/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=6sa9akdcpc2" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto">Basically, I copied Elevate.exe (<a href="https://jpassing.com/2007/12/08/launch-elevated-processes-from-the-command-line/" rel="nofollow ugc">had already downloaded</a>) to Windows\System32 only because it was already in my path.  Instead of executing "sc start service", I used "elevate sc start service".  I tested it in a non-elevated command prompt first which worked so tried as a trigger and it worked!</p>
<p dir="auto">Thanks</p>
]]></description><link>https://www.triggercmd.com/forum/post/302</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/302</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Sat, 25 Nov 2017 19:25:45 GMT</pubDate></item></channel></rss>