Configure conemu with Visual Studio command prompt variables

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.


Solution 1:

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

Solution 2:

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