<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>命令提示符 on kenji.blog</title><link>http://kenji.blog/zh-cn/tags/%E5%91%BD%E4%BB%A4%E6%8F%90%E7%A4%BA%E7%AC%A6/</link><description>Recent content in 命令提示符 on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><copyright>kenjinote</copyright><lastBuildDate>Mon, 14 Apr 2025 00:41:45 +0900</lastBuildDate><atom:link href="http://kenji.blog/zh-cn/tags/%E5%91%BD%E4%BB%A4%E6%8F%90%E7%A4%BA%E7%AC%A6/index.xml" rel="self" type="application/rss+xml"/><item><title>查看Windows许可证状态的命令</title><link>http://kenji.blog/zh-cn/p/windows-%E3%81%AE%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9%E3%81%AE%E7%8A%B6%E6%85%8B%E3%82%92%E7%A2%BA%E8%AA%8D%E3%81%99%E3%82%8B%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89/</link><pubDate>Mon, 14 Apr 2025 00:41:45 +0900</pubDate><guid>http://kenji.blog/zh-cn/p/windows-%E3%81%AE%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9%E3%81%AE%E7%8A%B6%E6%85%8B%E3%82%92%E7%A2%BA%E8%AA%8D%E3%81%99%E3%82%8B%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89/</guid><description>&lt;img src="http://kenji.blog/p/windows-%E3%81%AE%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9%E3%81%AE%E7%8A%B6%E6%85%8B%E3%82%92%E7%A2%BA%E8%AA%8D%E3%81%99%E3%82%8B%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89/img_1.png" alt="Featured image of post 查看Windows许可证状态的命令" />&lt;h1 id="windows查看许可证状态的方法只需一条命令">【Windows】查看许可证状态的方法（只需一条命令）
&lt;/h1>&lt;p>您是否曾经想过您的Windows许可证是否已正确激活？&lt;/p>
&lt;p>这种情况下，&lt;strong>只需一条命令即可查看许可证信息的方法&lt;/strong> 非常方便。只需执行以下步骤，即可轻松检查当前的许可证状态。&lt;/p>
&lt;h2 id="查看许可证状态的命令">查看许可证状态的命令
&lt;/h2>&lt;p>您可以使用Windows内置的脚本工具来显示许可证信息。使用的命令如下：&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">slmgr /dli
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>执行此命令后，将在窗口中显示部分许可证信息。&lt;/p>
&lt;h2 id="执行方法">执行方法
&lt;/h2>&lt;ol>
&lt;li>
&lt;p>&lt;strong>在“开始菜单”中输入“cmd”，右键单击“命令提示符” → “以管理员身份运行”&lt;/strong>。&lt;/p>
&lt;/li>
&lt;li>
&lt;p>在命令提示符中输入以下内容，然后按Enter键：&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">slmgr /dli
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;/li>
&lt;li>
&lt;p>等待几秒钟，将显示如下所示的许可证信息。&lt;/p>
&lt;p>&lt;img src="http://kenji.blog/p/windows-%E3%81%AE%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9%E3%81%AE%E7%8A%B6%E6%85%8B%E3%82%92%E7%A2%BA%E8%AA%8D%E3%81%99%E3%82%8B%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89/img.png"
width="346"
height="198"
srcset="http://kenji.blog/p/windows-%E3%81%AE%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9%E3%81%AE%E7%8A%B6%E6%85%8B%E3%82%92%E7%A2%BA%E8%AA%8D%E3%81%99%E3%82%8B%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89/img_hu36ac086b0626fce0cec542003390f65d_5495_480x0_resize_box_3.png 480w, http://kenji.blog/p/windows-%E3%81%AE%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9%E3%81%AE%E7%8A%B6%E6%85%8B%E3%82%92%E7%A2%BA%E8%AA%8D%E3%81%99%E3%82%8B%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89/img_hu36ac086b0626fce0cec542003390f65d_5495_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="Windows许可证确认画面"
class="gallery-image"
data-flex-grow="174"
data-flex-basis="419px"
>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;h2 id="显示的主要信息">显示的主要信息
&lt;/h2>&lt;ul>
&lt;li>部分产品密钥&lt;/li>
&lt;li>许可证类型（零售、OEM等）&lt;/li>
&lt;li>许可证状态（有效、已过期、未激活等）&lt;/li>
&lt;/ul>
&lt;h2 id="想了解更详细的信息">想了解更详细的信息？
&lt;/h2>&lt;p>还有以下命令：&lt;/p>
&lt;ul>
&lt;li>&lt;code>slmgr /dlv&lt;/code>：显示更详细的许可证信息&lt;/li>
&lt;li>&lt;code>slmgr /xpr&lt;/code>：显示许可证的有效期（是否永久等）&lt;/li>
&lt;/ul>
&lt;h2 id="总结">总结
&lt;/h2>&lt;p>只需一条命令即可轻松查看Windows的许可证状态。&lt;/p>
&lt;ul>
&lt;li>&lt;strong>简单确认&lt;/strong>：&lt;code>slmgr /dli&lt;/code>&lt;/li>
&lt;li>&lt;strong>详细确认&lt;/strong>：&lt;code>slmgr /dlv&lt;/code>&lt;/li>
&lt;li>&lt;strong>确认有效期&lt;/strong>：&lt;code>slmgr /xpr&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>如果许可证出现问题，可能会限制更新或某些功能，因此定期检查会更放心。&lt;/p></description></item><item><title>使用 curl 生成二维码</title><link>http://kenji.blog/zh-cn/p/curl%E3%81%A7qr%E3%82%B3%E3%83%BC%E3%83%89%E7%94%9F%E6%88%90/</link><pubDate>Tue, 16 Apr 2024 00:42:27 +0900</pubDate><guid>http://kenji.blog/zh-cn/p/curl%E3%81%A7qr%E3%82%B3%E3%83%BC%E3%83%89%E7%94%9F%E6%88%90/</guid><description>&lt;img src="http://kenji.blog/p/curl%E3%81%A7qr%E3%82%B3%E3%83%BC%E3%83%89%E7%94%9F%E6%88%90/img.png" alt="Featured image of post 使用 curl 生成二维码" />&lt;h2 id="使用-curl-生成二维码">使用 curl 生成二维码
&lt;/h2>&lt;p>注意：介绍的方法是由服务器端生成并返回二维码，因此服务器可能会保留日志。在将个人信息等机密信息转换为二维码时请务必小心。&lt;/p>
&lt;h3 id="方法1">方法1
&lt;/h3>&lt;p>这是在命令提示符中生成二维码的方法。
&lt;code>qrenco.de&lt;/code> 会返回基于文本的响应。&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">curl qrenco.de/kenji.blog
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;ul>
&lt;li>输出结果&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">█████████████████████████████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">█████████████████████████████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████ ▄▄▄▄▄ █ ▄ ▄ █ ▄▄▄▄▄ ████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████ █ █ █ ▀▀▀██ █ █ ████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████ █▄▄▄█ █▀▀█▀▄█ █▄▄▄█ ████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████▄▄▄▄▄▄▄█▄▀ ▀ █▄▄▄▄▄▄▄████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████▄ █▀▄ ▄▀█▄▀ ▀██▄▀ ▄████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████▀▀▀█ ▄▄ ▄█▄█▀█▀▄██ ▀████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████▄▄▄██▄▄█ █▀█ ▄██▀▀█ █████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████ ▄▄▄▄▄ █▀█ ▀ ▄▀▄▄▄ ▀████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████ █ █ █▄▄ ▄▀▄▀▄ ██ ▀████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████ █▄▄▄█ █▀▀█ ▀▄▄▄ ▄▄██████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████▄▄▄▄▄▄▄█▄▄███▄▄█▄███▄████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">█████████████████████████████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">█████████████████████████████
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;h4 id="参考">参考
&lt;/h4>&lt;ul>
&lt;li>&lt;a class="link" href="https://qrenco.de/" target="_blank" rel="noopener"
>qrenco.de&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="方法2">方法2
&lt;/h3>&lt;p>&lt;code>api.qrserver.com&lt;/code> 会返回图像文件。&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">curl -o qr.png &amp;#34;https://api.qrserver.com/v1/create-qr-code/?size=150x150&amp;amp;data=HelloWorld&amp;#34;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;ul>
&lt;li>输出结果
&lt;img src="http://kenji.blog/p/curl%E3%81%A7qr%E3%82%B3%E3%83%BC%E3%83%89%E7%94%9F%E6%88%90/qr.png"
width="250"
height="250"
srcset="http://kenji.blog/p/curl%E3%81%A7qr%E3%82%B3%E3%83%BC%E3%83%89%E7%94%9F%E6%88%90/qr_hud34111b99823e39dfc62f9ba667fd5f9_390_480x0_resize_box_3.png 480w, http://kenji.blog/p/curl%E3%81%A7qr%E3%82%B3%E3%83%BC%E3%83%89%E7%94%9F%E6%88%90/qr_hud34111b99823e39dfc62f9ba667fd5f9_390_1024x0_resize_box_3.png 1024w"
loading="lazy"
class="gallery-image"
data-flex-grow="100"
data-flex-basis="240px"
>&lt;/li>
&lt;/ul>
&lt;h4 id="参考-1">参考
&lt;/h4>&lt;ul>
&lt;li>&lt;a class="link" href="https://goqr.me/api/doc/create-qr-code/" target="_blank" rel="noopener"
>QR Code Generator&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>使用命令提示符安装 PowerToys</title><link>http://kenji.blog/zh-cn/p/powertoys%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB/</link><pubDate>Sat, 30 Sep 2023 21:23:00 +0900</pubDate><guid>http://kenji.blog/zh-cn/p/powertoys%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB/</guid><description>&lt;img src="http://kenji.blog/p/powertoys%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB/img.png" alt="Featured image of post 使用命令提示符安装 PowerToys" />&lt;h1 id="使用命令提示符安装-powertoys">使用命令提示符安装 PowerToys
&lt;/h1>&lt;p>介绍使用命令提示符安装 PowerToys 的方法。&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">winget install Microsoft.PowerToys --source winget
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;h1 id="使用命令提示符卸载-powertoys">使用命令提示符卸载 PowerToys
&lt;/h1>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">winget uninstall --name PowerToys
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>在 Windows 中查找已添加到 PATH 路径的可执行文件位置的方法</title><link>http://kenji.blog/zh-cn/p/windows-%E3%81%A7%E3%83%91%E3%82%B9%E3%81%AE%E9%80%9A%E3%81%A3%E3%81%9F%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AE%E5%A0%B4%E6%89%80%E3%82%92%E8%A6%8B%E3%81%A4%E3%81%91%E3%82%8B%E6%96%B9%E6%B3%95/</link><pubDate>Mon, 03 Apr 2023 00:02:55 +0900</pubDate><guid>http://kenji.blog/zh-cn/p/windows-%E3%81%A7%E3%83%91%E3%82%B9%E3%81%AE%E9%80%9A%E3%81%A3%E3%81%9F%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AE%E5%A0%B4%E6%89%80%E3%82%92%E8%A6%8B%E3%81%A4%E3%81%91%E3%82%8B%E6%96%B9%E6%B3%95/</guid><description>&lt;img src="http://kenji.blog/p/windows-%E3%81%A7%E3%83%91%E3%82%B9%E3%81%AE%E9%80%9A%E3%81%A3%E3%81%9F%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AE%E5%A0%B4%E6%89%80%E3%82%92%E8%A6%8B%E3%81%A4%E3%81%91%E3%82%8B%E6%96%B9%E6%B3%95/img.png" alt="Featured image of post 在 Windows 中查找已添加到 PATH 路径的可执行文件位置的方法" />&lt;h1 id="在-windows-中查找已添加到-path-路径的可执行文件位置的方法">在 Windows 中查找已添加到 PATH 路径的可执行文件位置的方法
&lt;/h1>&lt;p>在指定可执行文件并运行命令时，有时我们会想知道该可执行文件到底在哪里。这种情况下，可以使用以下命令来查找可执行文件的位置。&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-powershell" data-lang="powershell">&lt;span class="line">&lt;span class="cl">&lt;span class="nb">where &lt;/span>&lt;span class="p">&amp;lt;&lt;/span>&lt;span class="n">可执行文件名&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>例如，如果想知道画图程序 (mspaint.exe) 的位置，可以像下面这样做。&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-powershell" data-lang="powershell">&lt;span class="line">&lt;span class="cl">&lt;span class="nb">where &lt;/span>&lt;span class="n">mspaint&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="py">exe&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;h1 id="参考">参考
&lt;/h1>&lt;ul>
&lt;li>&lt;a class="link" href="https://superuser.com/questions/49104/how-do-i-find-the-location-of-an-executable-in-windows" target="_blank" rel="noopener"
>How do I find the location of an executable in Windows?&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>快速批量删除大文件夹</title><link>http://kenji.blog/zh-cn/p/%E5%A4%A7%E3%81%8D%E3%81%AA%E3%83%95%E3%82%A9%E3%83%AB%E3%83%80%E3%83%BC%E3%82%92%E9%AB%98%E9%80%9F%E4%B8%80%E6%8B%AC%E5%89%8A%E9%99%A4/</link><pubDate>Tue, 20 Sep 2022 16:04:02 +0900</pubDate><guid>http://kenji.blog/zh-cn/p/%E5%A4%A7%E3%81%8D%E3%81%AA%E3%83%95%E3%82%A9%E3%83%AB%E3%83%80%E3%83%BC%E3%82%92%E9%AB%98%E9%80%9F%E4%B8%80%E6%8B%AC%E5%89%8A%E9%99%A4/</guid><description>&lt;img src="http://kenji.blog/p/%E5%A4%A7%E3%81%8D%E3%81%AA%E3%83%95%E3%82%A9%E3%83%AB%E3%83%80%E3%83%BC%E3%82%92%E9%AB%98%E9%80%9F%E4%B8%80%E6%8B%AC%E5%89%8A%E9%99%A4/img.png" alt="Featured image of post 快速批量删除大文件夹" />&lt;h2 id="快速批量删除大文件夹">快速批量删除大文件夹
&lt;/h2>&lt;p>在文件资源管理器中删除大文件夹时，由于会先完全扫描文件夹内容后再执行删除，所以速度较慢。
像下面这样使用命令删除的话，扫描和删除会同时执行，因此可以高速删除大文件夹。&lt;/p>
&lt;ol>
&lt;li>在命令提示符中，移动到目标文件夹所在的目录。&lt;/li>
&lt;li>执行 &lt;code>DEL /F /Q /S 文件夹名 &amp;gt; NUL&lt;/code>。&lt;/li>
&lt;li>执行 &lt;code>RMDIR /Q /S 文件夹名&lt;/code>。&lt;/li>
&lt;/ol></description></item></channel></rss>