After scouring the Internet for answers, I couldn’t find a solution, but I figured it out and thought I might post it here for others to see, as I’ve seen that people from different forums had the same question but there was no answer.
In Windows, there is a /X for the dir command, which states:
/X This displays the short names generated for non-8dot3 file
names. The format is that of /N with the short name inserted
before the long name. If no short name is present, blanks are
displayed in its place.
So, doing a dir /X command on C:\ displays the following:
C:\>dir /X
Volume in drive C is OSDisk
Volume Serial Number is XXXX-XXXX
Directory of C:\
...
08/17/2017 08:02 PM <DIR> PROGRA~1 Program Files
08/09/2017 03:58 PM <DIR> PROGRA~2 Program Files (x86)
...
You can use the directory short name PROGRA~2 to substitute Program Files (x86), and have the following settings in your settings.json for VS Code:
{
"terminal.integrated.shell.windows": "C:\\Windows\\Sysnative\\cmd.exe",
"terminal.integrated.shellArgs.windows": [
"/k C:\\PROGRA~2\\Cmder\\vendor\\init.bat"
]
}
Which does load Cmder successfully in the integrated terminal:
