Windows 10 1809 "start" command not finding commands in the provided path #512

Closed
opened 2026-01-30 21:54:03 +00:00 by claunia · 9 comments
Owner

Originally created by @ndcomplete on GitHub (Jan 8, 2019).

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.

Specifically, when using start to call a command/program that exists in a directory other than the current, calling directory, and using the /min or /max parameters, the command/program is not found. Providing an explicit path to the command fixes this.

Example:

In 1803, the following command worked.

start /D "%PROGRAMFILES%\IIS Express" /min iisexpress.exe /path:%WEBPATH% /port:%WEBPORT%

In 1809, it says that the command or program iisexpress.exe cannot be found. Removing /min fixes this. Running the command from the IIS Express folder fixes this. Adding the IIS Express folder to the %PATH% 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.

After further testing it seems that any command prompts open or commands that are available which run from the started process are successfully executed in the target path. For instance, passing in dir to start successfully outputs the IIS Express directory in the new window.

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 command but now it's being processed as a program, and it can't find the 'program' in the local directory. If so IMO this is a breaking change to the functionality.

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 command instead of a program. Another would be a flag that allows the path for not finding a target program to fall through into executing as a command. Lastly, the code for detecting if the program 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.

Originally created by @ndcomplete on GitHub (Jan 8, 2019). 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. Specifically, when using `start` to call a command/program that exists in a directory other than the current, calling directory, and using the `/min` or `/max` parameters, the command/program is not found. Providing an explicit path to the command fixes this. Example: In 1803, the following command worked. ``` start /D "%PROGRAMFILES%\IIS Express" /min iisexpress.exe /path:%WEBPATH% /port:%WEBPORT% ``` In 1809, it says that the command or program `iisexpress.exe` cannot be found. Removing /min fixes this. Running the command from the IIS Express folder fixes this. Adding the IIS Express folder to the `%PATH%` 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. After further testing it seems that any command prompts open or commands that are available which run from the `start`ed process are successfully executed in the target path. For instance, passing in `dir` to `start` successfully outputs the IIS Express directory in the new window. 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 *command* but now it's being processed as a *program*, and it can't find the 'program' in the local directory. If so IMO this is a breaking change to the functionality. 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 *command* instead of a *program*. Another would be a flag that allows the path for not finding a target *program* to fall through into executing as a *command*. Lastly, the code for detecting if the *program* 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.
claunia added the Resolution-Duplicate label 2026-01-30 21:54:03 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Jan 8, 2019):

This looks like a duplicate of #271, which is fixed in the 19H1 preview builds. Let's continue discussion over there.

Thanks!

@DHowett-MSFT commented on GitHub (Jan 8, 2019): This looks like a duplicate of #271, which is fixed in the 19H1 preview builds. Let's continue discussion over there. Thanks!
Author
Owner

@ndcomplete commented on GitHub (Jan 9, 2019):

I looked at that other one first and it seems like very different symptoms unless you're suggesting it's the same core issue.

@ndcomplete commented on GitHub (Jan 9, 2019): I looked at that other one first and it seems like very different symptoms unless you're suggesting it's the same core issue.
Author
Owner

@DHowett-MSFT commented on GitHub (Jan 9, 2019):

Sorry, yes. They're the same core issue. We made some changes to start in the October update in support of the Tabbed Shell initiative, but that did cause a couple regressions. This and 271 are from the same change & were fixed at the same time.

@DHowett-MSFT commented on GitHub (Jan 9, 2019): Sorry, yes. They're the same core issue. We made some changes to `start` in the October update in support of the Tabbed Shell initiative, but that did cause a couple regressions. This and 271 are from the same change & were fixed at the same time.
Author
Owner

@aggieNick02 commented on GitHub (Jan 11, 2019):

Just wanted to double check that these two really are the same issue. It seems a bit odd because this issue was only seen when using /min or /max with start, and the other issue I filed was only seen when not using /min or /max. If that makes sense based on the changes to start for Tabbed Shell, great, but I just wanted to make sure.

@aggieNick02 commented on GitHub (Jan 11, 2019): Just wanted to double check that these two really are the same issue. It seems a bit odd because this issue was only seen when using /min or /max with start, and the other issue I filed was only seen when **not** using /min or /max. If that makes sense based on the changes to start for Tabbed Shell, great, but I just wanted to make sure.
Author
Owner

@DHowett-MSFT commented on GitHub (Jan 11, 2019):

@aggieNick02 yep! The only changes we made to start were in pursuit of the Tabbed Shell initiative, and the very same changes are the ones we disabled to fix every new 1809 regression regarding start with various flag sets 😄

(FWIW, I've verified that this specific case IS fixed in 19H1.)

@DHowett-MSFT commented on GitHub (Jan 11, 2019): @aggieNick02 yep! The only changes we made to start were in pursuit of the Tabbed Shell initiative, and the very same changes are the ones we disabled to fix _every new 1809 regression regarding `start` with various flag sets_ :smile: (FWIW, I've verified that this specific case IS fixed in 19H1.)
Author
Owner

@RoboBurned commented on GitHub (Mar 21, 2019):

Is there any workaround for this until we got the update? All our commands like this do not work:
start /D "directory" "somecommand.bat"
The /D parameter do now work.
This is critical issue because all CI CD and other deployment scripts are now broken. This must be fixed ASAP.

@RoboBurned commented on GitHub (Mar 21, 2019): Is there any workaround for this until we got the update? All our commands like this do not work: ```start /D "directory" "somecommand.bat" ``` The /D parameter do now work. This is critical issue because all CI CD and other deployment scripts are now broken. This must be fixed ASAP.
Author
Owner

@miniksa commented on GitHub (Mar 21, 2019):

Try doing start /newwindow /D "directory" "somecommand.bat".

@miniksa commented on GitHub (Mar 21, 2019): Try doing `start /newwindow /D "directory" "somecommand.bat"`.
Author
Owner

@aggieNick02 commented on GitHub (Mar 21, 2019):

Or just try adding /max after start. That was enough for us

On Thu, Mar 21, 2019, 12:56 PM Michael Niksa notifications@github.com
wrote:

Try doing start /newwindow /D "directory" "somecommand.bat".


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/console/issues/345#issuecomment-475314552,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQBxGSABxMxWOPtBg-WUal9_I2lYnQRCks5vY7mqgaJpZM4Z2Mrj
.

@aggieNick02 commented on GitHub (Mar 21, 2019): Or just try adding /max after start. That was enough for us On Thu, Mar 21, 2019, 12:56 PM Michael Niksa <notifications@github.com> wrote: > Try doing start /newwindow /D "directory" "somecommand.bat". > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/Microsoft/console/issues/345#issuecomment-475314552>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AQBxGSABxMxWOPtBg-WUal9_I2lYnQRCks5vY7mqgaJpZM4Z2Mrj> > . >
Author
Owner

@RoboBurned commented on GitHub (Mar 22, 2019):

@miniksa @aggieNick02 both commands does not work. I tried the following combinations:

start /MIN /D "directory" "somecommand.bat"
start /MAX /D "directory" "somecommand.bat"
These commands just start another command window minimized or maximized with CWD=directory. bat file is not executed.

start /newwindow /D "directory" "somecommand.bat"
This command opens new command window with CWD=directory. bat file is not executed

start "Title" /MIN /D "directory" "somecommand.bat"
This command returns an error:
The system cannot find the file somecommand.bat.

start "Title" /D "directory" "somecommand.bat"
This command starts the bat file but not minimizes the window.

start "Title" /MIN /D "directory" "directory\somecommand.bat"
This command starts minimized command window with CWD=directory and error
The system cannot find the path specified.

start "Title" /MIN "directory\somecommand.bat"
This is another command that starts the bat file but CWD is not changed to "directory"

All commands without "Title" provided does not start bat file but open empty command window instead.

@RoboBurned commented on GitHub (Mar 22, 2019): @miniksa @aggieNick02 both commands does not work. I tried the following combinations: ```start /MIN /D "directory" "somecommand.bat"``` ```start /MAX /D "directory" "somecommand.bat"``` These commands just start another command window minimized or maximized with CWD=directory. bat file is not executed. ```start /newwindow /D "directory" "somecommand.bat"``` This command opens new command window with CWD=directory. bat file is not executed ```start "Title" /MIN /D "directory" "somecommand.bat"``` This command returns an error: ```The system cannot find the file somecommand.bat.``` ```start "Title" /D "directory" "somecommand.bat"``` This command starts the bat file but not minimizes the window. ```start "Title" /MIN /D "directory" "directory\somecommand.bat"``` This command starts minimized command window with CWD=directory and error ```The system cannot find the path specified.``` ```start "Title" /MIN "directory\somecommand.bat"``` This is another command that starts the bat file but CWD is not changed to "directory" All commands without "Title" provided does not start bat file but open empty command window instead.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#512