Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Native Tools Command Prompt on VS2015 RC

Since I cannot locate Native Tools CMD under the Tools menu, I try to manually add it in External Tools. Few questions:

  1. 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?
  2. 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?
  3. What is Initial Directory?

Screenshot

like image 455
KMC Avatar asked Aug 25 '26 13:08

KMC


1 Answers

Why the different CMDs end up having the same path to the native System32's CMD?

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 run InstallUtil.exe you will just type InstallUtil 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.

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?

/k is a parameter for cmd.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).

What is Initial Directory?

Initial directory is used to specify the working directory that your cmd.exe instance will start in

So in the end you'll have something like this for Visual Studio 2015:

enter image description here

The "arguments" for VS2015 is :

/k "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat"

like image 138
Nasreddine Avatar answered Aug 28 '26 03:08

Nasreddine



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!