Since I cannot locate Native Tools CMD under the Tools menu, I try to manually add it in External Tools. Few questions:
- Regardless of what I choose for Command (ARM, x86 or x64 etc.), Command is always C:\Windows\System32\cmd.exe. Why the different CMDs end up having the same path to the native System32's CMD?
- Referring to this answer, I should insert /k "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat" to the arguments - what is the /k and what is the bat for this argument? Why do I need to pass a path as an argument to the command prompt?
- What is Initial Directory?
The VS2015* CMDs are just
cmd.exe
with some environment variables already set up for you. so for example instead of typing"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe"
to runInstallUtil.exe
you will just typeInstallUtil
and it will work. if you didn't set up the environment variables you will get an error message saying that 'installutil' is not recognized as an internal or external command, operable program or batch file./k
is a parameter forcmd.exe
and what it does is run the commands specified by the string that follows (in this case it will execute what's inside"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat"
and will carry out).Initial directory is used to specify the working directory that your
cmd.exe
instance will start inSo in the end you'll have something like this for Visual Studio 2015:
The "arguments" for VS2015 is :
I took a look at my start menu and right clicked on Developer Command Prompt for VS2015. Copied target %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat""
MSBuild Command Prompt for VS2015 Copied target %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsMSBuildCmd.bat""
https://connect.microsoft.com/VisualStudio/feedback/details/747807/vs2012-x64-native-tools-command-prompt