<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Command Prompt on kenji.blog</title><link>http://kenji.blog/en/tags/command-prompt/</link><description>Recent content in Command Prompt on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>kenjinote</copyright><lastBuildDate>Mon, 14 Apr 2025 00:41:45 +0900</lastBuildDate><atom:link href="http://kenji.blog/en/tags/command-prompt/index.xml" rel="self" type="application/rss+xml"/><item><title>Command to check Windows license status</title><link>http://kenji.blog/en/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/en/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 Command to check Windows license status" />&lt;h1 id="windows-how-to-check-license-status-just-one-command">[Windows] How to check license status (just one command)
&lt;/h1>&lt;p>Have you ever wondered if your Windows license is correctly activated?&lt;/p>
&lt;p>A very convenient method is to &lt;strong>check your license information with a single command&lt;/strong>. By following the steps below, you can easily check your current license status.&lt;/p>
&lt;h2 id="command-to-check-license-status">Command to check license status
&lt;/h2>&lt;p>You can display license information using a script tool built into Windows. Here is the command to use:&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>When you run this command, partial license information will be displayed in a window.&lt;/p>
&lt;h2 id="how-to-run">How to run
&lt;/h2>&lt;ol>
&lt;li>
&lt;p>&lt;strong>Type &amp;ldquo;cmd&amp;rdquo; in the Start Menu, right-click on Command Prompt, and select &amp;ldquo;Run as administrator&amp;rdquo;.&lt;/strong>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Enter the following into the command prompt and press the Enter key:&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>After waiting a few seconds, license information like the following will be displayed.&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 license confirmation screen"
class="gallery-image"
data-flex-grow="174"
data-flex-basis="419px"
>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;h2 id="main-information-displayed">Main information displayed
&lt;/h2>&lt;ul>
&lt;li>Part of the product key&lt;/li>
&lt;li>License type (Retail, OEM, etc.)&lt;/li>
&lt;li>License status (Licensed, expired, not activated, etc.)&lt;/li>
&lt;/ul>
&lt;h2 id="want-to-know-more-detailed-information">Want to know more detailed information?
&lt;/h2>&lt;p>There are also commands like the following:&lt;/p>
&lt;ul>
&lt;li>&lt;code>slmgr /dlv&lt;/code>: Display more detailed license information&lt;/li>
&lt;li>&lt;code>slmgr /xpr&lt;/code>: Display the license expiration date (e.g., whether it is permanent)&lt;/li>
&lt;/ul>
&lt;h2 id="summary">Summary
&lt;/h2>&lt;p>You can easily check the Windows license status with a single command.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Simple check&lt;/strong>: &lt;code>slmgr /dli&lt;/code>&lt;/li>
&lt;li>&lt;strong>Detailed check&lt;/strong>: &lt;code>slmgr /dlv&lt;/code>&lt;/li>
&lt;li>&lt;strong>Expiration date check&lt;/strong>: &lt;code>slmgr /xpr&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>If there is a problem with your license, updates or some functions may be restricted, so it is safe to check regularly.&lt;/p></description></item><item><title>Generate QR code with curl</title><link>http://kenji.blog/en/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/en/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 Generate QR code with curl" />&lt;h2 id="generate-qr-code-with-curl">Generate QR code with curl
&lt;/h2>&lt;p>Note: The method introduced below generates the QR code on the server side and returns it, so logs might be kept. Please be careful when converting confidential information such as personal information into a QR code.&lt;/p>
&lt;h3 id="method-1">Method 1
&lt;/h3>&lt;p>This is a method to generate a QR code in the command prompt.
&lt;code>qrenco.de&lt;/code> returns a text-based response.&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>Output result&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="reference">Reference
&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="method-2">Method 2
&lt;/h3>&lt;p>&lt;code>api.qrserver.com&lt;/code> returns an image.&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>Output result
&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="reference-1">Reference
&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>Install PowerToys via Command Prompt</title><link>http://kenji.blog/en/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/en/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 Install PowerToys via Command Prompt" />&lt;h1 id="install-powertoys-via-command-prompt">Install PowerToys via Command Prompt
&lt;/h1>&lt;p>Here is how to install PowerToys via Command Prompt.&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="uninstall-powertoys-via-command-prompt">Uninstall PowerToys via Command Prompt
&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>How to find the location of an executable in Windows</title><link>http://kenji.blog/en/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/en/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 How to find the location of an executable in Windows" />&lt;h1 id="how-to-find-the-location-of-an-executable-in-windows">How to find the location of an executable in Windows
&lt;/h1>&lt;p>Sometimes when you execute a command by specifying an executable file, you want to know where that executable file is located. In such cases, you can find the location of the executable file using the following command.&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">executable_file_name&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>For example, if you want to know the location of Paint (mspaint.exe), you can do it as follows.&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="references">References
&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>Fast Batch Deletion of Large Folders</title><link>http://kenji.blog/en/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/en/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 Fast Batch Deletion of Large Folders" />&lt;h2 id="fast-batch-deletion-of-large-folders">Fast Batch Deletion of Large Folders
&lt;/h2>&lt;p>When deleting a large folder in Explorer, the deletion is executed after all the folder contents are fully searched, which is slow.
By deleting with a command as shown below, the search and deletion are executed simultaneously, allowing you to delete large folders at high speed.&lt;/p>
&lt;ol>
&lt;li>Move to the target folder level in the Command Prompt.&lt;/li>
&lt;li>Execute &lt;code>DEL /F /Q /S folder_name &amp;gt; NUL&lt;/code>.&lt;/li>
&lt;li>Execute &lt;code>RMDIR /Q /S folder_name&lt;/code>.&lt;/li>
&lt;/ol></description></item></channel></rss>