<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.17763.475

Other software: Elasticsearch 6.7.0 using Java 1.8.0_172, but the behavior was 
confirmed with a test batch file and executable."><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.17763.475

Other software: Elasticsearch 6.7.0 using Java 1.8.0_172, but the behavior was 
confirmed with a test batch file and executable.
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">When testing the functionality of the <code class="notranslate">start</code> command within the <code class="notranslate">cmd.exe</code> shell, I found that having the <code class="notranslate">/min</code> parameter would affect the <code class="notranslate">/d</code> parameter: the path provided to the <code class="notranslate">/d</code> parameter did not seem to be acknowledged, and the command passed to the <code class="notranslate">start</code> command would not be found.</p>
<p dir="auto">Test example:</p>
<ul dir="auto">
<li>Command shell with prompt at <code class="notranslate">C:\temp</code></li>
<li>A test batch file at <code class="notranslate">C:\temp\testdir\test.bat</code>, with the content</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@echo hello
pause"><pre class="notranslate"><code class="notranslate">@echo hello
pause
</code></pre></div>
<ul dir="auto">
<li>Running the following command would succeed:<br>
<code class="notranslate">C:\temp&gt;start /d c:\temp\testdir test.bat</code></li>
<li>The following command would not succeed:<br>
<code class="notranslate">C:\temp&gt;start /min /d c:\temp\testdir test.bat</code></li>
<li>If the path is set to <code class="notranslate">C:\temp\testdir</code> the following command would succeed:<br>
<code class="notranslate">C:\temp\testdir&gt;start /min test.bat</code></li>
</ul>
<p dir="auto">The use of the <code class="notranslate">/d</code> and <code class="notranslate">/min</code> parameter together was previously working, and was required functionality for a commercial product.</p>
<p dir="auto">I'm wondering if this problem is related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="367370992" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/271" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/271/hovercard" href="https://github.com/microsoft/terminal/issues/271">#271</a> .</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">The <code class="notranslate">/d</code> parameter to be parsed when the <code class="notranslate">/min</code> parameter is also included to the <code class="notranslate">start</code> command.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">If the <code class="notranslate">/min</code> parameter is used with the <code class="notranslate">/d</code> parameter, the path used with the <code class="notranslate">/d</code> parameter does not seem to be used, and the program contained in the path referenced by the <code class="notranslate">/d</code> parameter is not found.</p>
<p dir="auto">In 1809, the way the <code class="notranslate">start</code> command (from <code class="notranslate">cmd.exe</code>) behaves has changed. You can work around it by adding <code class="notranslate">/max</code> or <code class="notranslate">/min</code> after <code class="notranslate">start</code>.</p>
<p dir="auto">Two concrete examples:</p>
<ol dir="auto">
<li>
<p dir="auto">Running something off a network share from a command prompt like:<br>
<code class="notranslate">start z:\myapp.exe</code><br>
will now throw up a security warning dialog, when it did not in 1803 and earlier.</p>
</li>
<li>
<p dir="auto">A powershell script like this:<br>
<code class="notranslate">$script={&amp; cmd.exe /c start notepad.exe}</code><br>
<code class="notranslate">$job = start-job -scriptblock $script</code><br>
would give you a job with state Running in 1803, until you closed notepad. In 1809, the job state is Completed before notepad is closed.</p>
</li>
</ol>
<p dir="auto">Adding <code class="notranslate">/max</code> or <code class="notranslate">/min</code> after <code class="notranslate">start</code> restores old behavior for both of these! That is crazy...</p>
<p dir="auto">Both of these behavior changes are going to break tools/code that rely on the old behaviors of no security prompt and the powershell job not being Complete until the started program exits.</p>
<p dir="auto">You can see how dramatically <code class="notranslate">start</code> has changed if you run procmon and filter to only <code class="notranslate">cmd.exe</code> process events. In Win10 1803, open a command prompt and do<br>
<code class="notranslate">start notepad.exe</code><br>
It results in &lt;100 events. Run in 1809 and get &gt;1000. Add /max and it drops back to &lt;100.</p>