Repository: microsoft/terminal (language: cpp)

Issue:
'C:\Program' is not recognized as an internal or external command when open VS Developer Command Prompt
### Windows Terminal version

1.17.11391

### Windows build number

10.0.22621.1778

### Other Software

_No response_

### Steps to reproduce

Open Developer Command Prompt for Visual Studio 2022 from WT

### Expected Behavior

_No response_

### Actual Behavior

![image](https://github.com/microsoft/terminal/assets/1913505/80df51e6-138c-4942-9ffe-6cb0ffac0bb7)



Discussion / hints:

Fix patch:
diff --git a/src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp b/src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp
index f4e5dd0298a..19d6f50cc88 100644
--- a/src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp
+++ b/src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp
@@ -44,11 +44,12 @@ std::wstring VsDevCmdGenerator::GetProfileCommandLine(const VsSetupConfiguration
     commandLine.append(GetDevCmdScriptPath(instance));
     // The "-startdir" parameter will prevent "vsdevcmd" from automatically
     // setting the shell path so the path in the profile will be used instead.
-    commandLine.append(LR"(" -startdir=none)");
 #if defined(_M_ARM64)
-    commandLine.append(LR"(" -arch=arm64 -host_arch=x64)");
+    commandLine.append(LR"(" -startdir=none -arch=arm64 -host_arch=x64)");
 #elif defined(_M_AMD64)
-    commandLine.append(LR"(" -arch=x64 -host_arch=x64)");
+    commandLine.append(LR"(" -startdir=none -arch=x64 -host_arch=x64)");
+#else
+    commandLine.append(LR"(" -startdir=none)");
 #endif
     return commandLine;
 }


Test patch: