<?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[Start Notepad++ with powershell]]></title><description><![CDATA[<p dir="auto">I would like to start Notepad++ minimized.<br />
I can start Notepad minimized by using a shortcut in windows desktop but when applying it in powershell,</p>
<p dir="auto">start C:\Users\ {myusername} \AppData\Roaming\Microsoft\Windows\ “Start Menu” \Programs\Notepad++.lnk</p>
<p dir="auto">I use some spaces at myusername and start menu to show the slashes.</p>
<p dir="auto">then it says:</p>
<p dir="auto">Game stopped script<br />
This command cannot be run due to the error:<br />
cannot find the path specified.</p>
<p dir="auto">at &lt;ScriptBlock&gt;,&lt;No file&gt;:line 1</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/25065/start-notepad-with-powershell</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 17:01:44 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/25065.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 25 Oct 2023 23:53:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Start Notepad++ with powershell on Fri, 27 Oct 2023 00:01:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/27990">@_</a> A couple of comments (well, it turned out to be a lot more…):</p>
<ol>
<li>Gotcha#1 - If Notepad++ is already running then when you start a new instance of Notepad++.exe it sees that a copy is already running and will hand control to that. It does not pass along that it was started minimized. Thus Notepad++ will appear to start as a window or maximized if that’s what you already had it as.</li>
<li>Gotcha #2 - If Notepad++ is already running, but minimized, then attempts to start Notepad++ as minimized end up both passing control to the already running copy but also activating it to a normal or maximized window.</li>
<li>Gotcha 3 - There is another “gotcha” where if Notepad++ is running as a maximized window, you exit/close it, and then attempt to start it as minimized that Notepad++ will fire up as maximized.</li>
</ol>
<p dir="auto">The only thing works is for you to be running Notepad++ as a non-full screen windowed application, for you to exit/close it, and then to start it as minimized.</p>
<p dir="auto">The second issue is your syntax for how to start Notepad++ seemed rather mangled.  I don’t know if the mangling was your attempt to copy/paste a correct command into the forum or if attempted the wrong syntax to start with.  I suspect you started with the wrong syntax as you mentioned “<code>&lt;ScriptBlock&gt;,&lt;No file&gt;:line 1</code>” etc. which is unexpected regardless of how you were trying to start Notepad++.</p>
<p dir="auto">The syntax I used from PowerShell was:<br />
<code>Start-Process "C:\npp\npp858x64\notepad++.exe" -WindowStyle Minimized</code></p>
<p dir="auto">I got the <code>C:\npp\npp858x64\notepad++.exe</code> part that is inside the quotes from Notepad++’ <code>? / Debug info...</code> menu. A box or window will pop up.  The second line of that box for me was:<br />
<code>Path : C:\npp\npp858x64\notepad++.exe</code><br />
I copy/pasted the part into the command line that I used for testing this.</p>
<p dir="auto">A normal installation of Notepad++ is usually in the <code>C:\Program Files\Notepad++\notepad++.exe</code> directory meaning people would use:<br />
<code>Start-Process "C:\Program Files\Notepad++\notepad++.exe" -WindowStyle Minimized</code></p>
<p dir="auto">Again though, the gotchas mentioned above will apply regardless on if you try to start Notepad++ from Powershell, via a .lnk shortcut file that says “run minimized” or the command prompt’s <code>START</code> command with the <code>/MIN</code> option run run either the exe or shortcut.  All of them will fail to be minimized if any of the gotchas I listed above apply.</p>
<p dir="auto">To start a minimized Notepad++ you must:</p>
<ol>
<li>Not already have Notepad++.exe running.</li>
<li>That when you exited/closed Notepad++ that it had been a windowed app (not maximized) regardless on if you may have had it minimized at the time you closed it.<br />
It’s a rather narrow eye-hole in the needle but you can nail it 100% of the time if those two conditions exist.</li>
</ol>
<p dir="auto">If you absolutely must start a minimized copy of Notepad++ then I would:</p>
<ol>
<li>Install a portable copy somewhere.</li>
<li>Rename the portable copy of Notepad++.exe to something else such as min-notepad.exe.</li>
<li>In your powershell script see if the min-notepad.exe process is running and if so, kill it and wait for it to terminate as we will then be updating the config.xml file.</li>
<li>In your powershell script inspect the config.xml file for your portable copy and see if the line for <code>&lt;GUIConfig name="AppPosition" ...</code> has <code>isMaximized="yes"</code>.  If so, change that to be <code>isMaximized="no"</code> and save it.</li>
<li>Now you can start min-notepad.exe in minimized mode but there is still one more gotcha… You need to start min-notepad.exe with the <code>-multiInst</code> command line option to prevent it from locating a copy of Notepad.exe that is already running and passing control to it. The PowerShell command becomes:<br />
<code>Start-Process "C:\npp\npp858x64\min-notepad.exe" -ArgumentList @("-multiInst") -WindowStyle Minimized</code></li>
</ol>
]]></description><link>https://community.notepad-plus-plus.org/post/90125</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90125</guid><dc:creator><![CDATA[mkupper]]></dc:creator><pubDate>Fri, 27 Oct 2023 00:01:07 GMT</pubDate></item><item><title><![CDATA[Reply to Start Notepad++ with powershell on Thu, 26 Oct 2023 00:14:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/27990">@_</a> said in <a href="/post/90088">Start Notepad++ with powershell</a>:</p>
<blockquote>
<p dir="auto">start C:\Users\ {myusername} \AppData\Roaming\Microsoft\Windows\ “Start Menu” \Programs\Notepad++.lnk</p>
</blockquote>
<p dir="auto">Try using:</p>
<pre><code> start 'C:\Users\{myusername}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Notepad++.lnk'
</code></pre>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90089</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90089</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Thu, 26 Oct 2023 00:14:12 GMT</pubDate></item></channel></rss>