Why Python can not execute the cmd command 'tskill'?
<p>In general, we can use Python to execute Windows's cmd command, for example:</p>

<pre><code> os.system('ipconfig')
</code></pre>

<p>but I find that <code>tskill</code> can not be executed by Python, if I use:</p>

<pre><code>os.system('tskill 8684')
</code></pre>

<p>to kill a process by its pid, Python will show cmd's error:</p>

<pre><code>'tskill' is not recognized as an internal or external command, operable program or batch file.
</code></pre>

<p>but it work well if I use cmd to run the command.</p>

<p>As I know <code>tskill.exe</code> is located in C:\Windows\System32, but this path is not in Python's environment variable. It is maybe the reason, but <code>ipconfig.exe</code> is also in System32, it can be executed.</p>

<p>So why <code>tskill</code> can not be executed by <strong>os.system</strong> or <strong>subprocess.Popen</strong>?</p>