I observe that when I run code
in the Run dialog, a cmd window opens, while if I run it via double click or via Start menu there isn't any such a window.
Is there a reason for that?
If you open it from Start menu, you're launching a shortcut to C:\Program Files\Microsoft VS Code\Code.exe
GUI app. You can verify that by going to the location of the shortcut and checking its properties.
Typing code
, on the other hand, launches C:\Program Files\Microsoft VS Code\bin\code
, which is a binary file that works in CLI and which launches the GUI app after paring any arguments, switches etc.
C:\Program Files\Microsoft VS Code\bin
is added to the PATH
env var, hence e.g. run box finds and executes that binary file.