I'm trying to open two VSCode projects from a batch file, and then close the batch file and let the VSCode run.
Tried several methods:
This does not close the batch file, and if I close it by my self, VSCode terminates:
start "" "C:\Program Files\Microsoft VS Code\Code.exe" c:\project1
start "" "C:\Program Files\Microsoft VS Code\Code.exe" c:\project2
exit
This one opens two cmds, each one opens VSCode and then terminates, but often it also holds and does not close for some reason:
start cmd /c "code c:\project1 && exit"
start cmd /c "code c:\project2 && exit"
Simply running VSCode sometimes holds the execution of the next commands altogether:
code c:\project1
code c:\project2
.
. <-- Next commands don't run
.
So how should I open VSCode in a way that will not stop the execution and will not depend on the terminal remaining open?