<p dir="auto">We have an issue with some of our run scripts that utilize the "start" command and have isolated it to the changes in 1809 vs 1803. This seems to be different from the other issues that have been identified.</p>
<p dir="auto">Specifically, when using <code class="notranslate">start</code> to call a command/program that exists in a directory other than the current, calling directory, and using the <code class="notranslate">/min</code> or <code class="notranslate">/max</code> parameters, the command/program is not found. Providing an explicit path to the command fixes this.</p>
<p dir="auto">Example:</p>
<p dir="auto">In 1803, the following command worked.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="start /D &quot;%PROGRAMFILES%\IIS Express&quot; /min iisexpress.exe /path:%WEBPATH% /port:%WEBPORT%"><pre class="notranslate"><code class="notranslate">start /D "%PROGRAMFILES%\IIS Express" /min iisexpress.exe /path:%WEBPATH% /port:%WEBPORT%
</code></pre></div>
<p dir="auto">In 1809, it says that the command or program <code class="notranslate">iisexpress.exe</code> cannot be found. Removing /min fixes this. Running the command from the IIS Express folder fixes this. Adding the IIS Express folder to the <code class="notranslate">%PATH%</code> fixes this. To me this highlights another issue in the implementation of the /min flag in 1809, that it does not seem to be searching for commands in the directory provided.</p>
<p dir="auto">After further testing it seems that any command prompts open or commands that are available which run from the <code class="notranslate">start</code>ed process are successfully executed in the target path. For instance, passing in <code class="notranslate">dir</code> to <code class="notranslate">start</code> successfully outputs the IIS Express directory in the new window.</p>
<p dir="auto">I'm wondering if there is a difference in how the 'command' is being processed. That is, if it was previously being processed as a <em>command</em> but now it's being processed as a <em>program</em>, and it can't find the 'program' in the local directory. If so IMO this is a breaking change to the functionality.</p>
<p dir="auto">One option would be to add a flag (that I've not been able to find in the directory) of hard-defining the provided 'command as a <em>command</em> instead of a <em>program</em>. Another would be a flag that allows the path for not finding a target <em>program</em> to fall through into executing as a <em>command</em>. Lastly, the code for detecting if the <em>program</em> exists should prepend the target path to it, either by default or with a flag. This is all speculation though, as I can't see the source.</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>