<?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[Have Alexa say result of long running process, like chkdsk]]></title><description><![CDATA[<p dir="auto">This is probably not something for a beginner, but it uses lot of TRIGGERcmd functionality, so it's a good learning experience.</p>
<p dir="auto">I made <a href="https://youtu.be/JvMqtS2tQOY" rel="nofollow ugc">this video</a> to explain the process.</p>
<p dir="auto">Prerequisites:</p>
<ul>
<li>Link the <a href="https://www.triggercmd.com/forum/topic/538/using-the-alexa-smart-home-skill-the-first-time">TRIGGERcmd Smart Home</a> Alexa skill</li>
<li>Link the <a href="https://www.triggercmd.com/forum/topic/537/using-the-alexa-non-smart-home-skill-the-first-time">TRIGGERcmd</a> Alexa skill</li>
<li>Install the <a href="https://www.triggercmd.com/forum/topic/196/tcmd-go-command-line-tool-is-available-now">tcmd</a> command line tool.</li>
</ul>
<p dir="auto">This is how it works:</p>
<ul>
<li>I say, "<strong>Alexa, turn on check disk</strong>"</li>
<li>TRIGGERcmd Smart Home Alexa skill runs the TRIGGERcmd command called <strong>chkdsk_run</strong>.</li>
<li><strong>d:\tools\run_chkdsk.bat</strong> script runs, including <strong>chkdsk <img src="https://www.triggercmd.com/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=6sa9akdcpc2" class="not-responsive emoji emoji-android emoji--smile" style="height:23px;width:auto;vertical-align:middle" title="c:" alt="😄" /> &gt; d:\tools\log.chk</strong>, then <strong>tcmd -c russhp -t chkdsk_routine</strong>.</li>
<li>My <strong>chkdsk report</strong> Alexa routine runs with custom action: <strong>ask TRIGGER C M D to run report</strong></li>
<li>TRIGGERcmd Alexa skill runs the TRIGGERcmd command called <strong>chkdsk_report</strong>.</li>
<li><strong>d:\tools\report_chkdsk_status.bat</strong> script runs, including <strong>%USERPROFILE%\.TRIGGERcmdData\SendResult.bat good</strong> (assuming the chkdsk log shows "No further action is required.")</li>
<li>TRIGGERcmd Alexa skill audibly replies, <strong>"Check disk good"</strong></li>
</ul>
<p dir="auto">My three TRIGGERcmd commands:</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1644707145819-9e55fa69-1870-4d2a-ba47-6db62e86fafa-image.png" alt="9e55fa69-1870-4d2a-ba47-6db62e86fafa-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="/forum/assets/uploads/files/1644707230166-20fbf687-d128-4288-85d7-bfb627d2b0c1-image.png" alt="20fbf687-d128-4288-85d7-bfb627d2b0c1-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">My d:\tools\run_chkdsk.bat file:</p>
<pre><code>del d:\tools\log.chk
chkdsk c: &gt; d:\tools\log.chk
tcmd -c russhp -t chkdsk_routine
</code></pre>
<p dir="auto">My report_chkdsk_status.bat file:</p>
<pre><code>type d:\tools\log.chk | find "No further action is required."
IF ERRORLEVEL 1 goto bad
goto good

:good
%USERPROFILE%\.TRIGGERcmdData\SendResult.bat good
goto end

:bad
%USERPROFILE%\.TRIGGERcmdData\SendResult.bat bad

:end
</code></pre>
<p dir="auto">My Alexa routine:</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1644708916671-chkdsk_routine.png" alt="chkdsk_routine.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Notice the chkdsk_run command is a background command, so make sure you install the background service first, like this:</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1644708490320-b6060ac1-ecc9-4fc4-80fe-ebed6339246d-image.png" alt="b6060ac1-ecc9-4fc4-80fe-ebed6339246d-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">The run_chkdsk.bat needs to run in the background service so it runs as Local System.  That gives it access to run chkdsk.exe.</p>
<p dir="auto">The run_chkdsk.bat script also includes this command: tcmd -c russhp -t chkdsk_routine<br />
The tcmd command needs your token.tkn file to authenticate with your TRIGGERcmd account.<br />
The tcmd command will look for token.tkn in the user's .TRIGGERcmdData folder within the user's profile folder.  The TRIGGERcmdAgent background service runs as Local System, and Local System user's profile folder is C:\Windows\System32\config\systemprofile.  You'll need to run a cmd window "as administrator" to access that folder, like this:<br />
<img src="/forum/assets/uploads/files/1644762535670-6c3a9eb7-7d3c-4b51-bafd-78566fea4a86-image.png" alt="6c3a9eb7-7d3c-4b51-bafd-78566fea4a86-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Run these commands in that cmd window to copy your token.tkn file to the Local System user's .TRIGGERcmdData folder:</p>
<pre><code>cd C:\Windows\System32\config\systemprofile\
mkdir .TRIGGERcmdData
cd .TRIGGERcmdData
copy %USERPROFILE%\.TRIGGERcmdData\token.tkn .
</code></pre>
]]></description><link>https://www.triggercmd.com/forum/topic/2046/have-alexa-say-result-of-long-running-process-like-chkdsk</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 00:21:38 GMT</lastBuildDate><atom:link href="https://www.triggercmd.com/forum/topic/2046.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 12 Feb 2022 23:21:53 GMT</pubDate><ttl>60</ttl></channel></rss>