Configure conemu with Visual Studio command prompt variables

6

2

I have searched and searched and got nothing. Please let me know how can I use conemu as a Visual Studio command prompt replacement. I mean how can I add the variable in the vcvarsall.bat to a conemu session without actually going to that directory again and again. There has to some kind of shortcut. How can I achieve that. Please help.

Soham Dasgupta

Posted 2013-06-26T05:21:23.140

Reputation: 1 094

Answers

11

Not quite sure, what is the problem. If you want to run VC build prompt in ConEmu tab - just set up your Task or Startup Command line to something like this

cmd /k "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86

If you want to get shortcut - run something like

"C:\Program Files\ConEmu\ConEmu.exe" /cmd cmd /k "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86

Maximus

Posted 2013-06-26T05:21:23.140

Reputation: 19 395

One thing I still don't know how to do is set the start folder by default to C: when starting ConEmu. – Soham Dasgupta – 2013-06-27T09:50:31.083

This depends on how do you start ConEmu (tab actually). You have not tell that. – Maximus – 2013-06-27T13:52:47.623

6

Adding to @maximus's answer I found that I needed to double the quotes to make that work.

cmd.exe /k ""%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86

Also, if you want that to run in administrator mode then you want it to be

cmd.exe /k ""%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86 -new_console:a

Jboy

Posted 2013-06-26T05:21:23.140

Reputation: 161

worked for me by placing in the supplied text in the bottom box, after the Set Prompt portion. I had to adjust my path for Vs 2012, which is version 11.0 – Rob Gray – 2014-11-15T02:27:58.247

1The -new_console:a does not work on my system – Canadian Luke – 2014-02-28T00:33:49.317