I'm using cl
in cmd
and having to run vcvars32.bat
every time I open a cmd
window is really a pain in the axx. Can anyone offer a way of running it automatically?
相关问题
- xcopy include folder
- Batch file if string starts by
- Jenkins - cmd is not recognized
- Does specifying the encoding in javac yield the sa
- String Manipulation with case sensitivity
相关文章
- 在vscode如何用code runner打开独立的控制台窗口,以及设置好调试模式时窗口的编码?
- Extracting columns from text file using Perl one-l
- How can one batch file get the exit code of anothe
- Command line escaping single quote for PowerShell
- How to make jenkins fail at a failing windows batc
- Problems using start-process to call other powersh
- Python utilizing multiple processors
- Why do all Pre-build or Post-build events in Visua
You can use the script in http://www.alteridem.net/2010/09/02/visual-studio-2010-command-prompt-here to make it so when you right-click a folder in explorer the option shows up. After downloading and extracting the zip file you can modify the .inf to point to the correct path to your particular VS version (and change the displayed name if desired). Note the comment on the page about having to rename the file if you are running 64-bit Windows.
way old, but the easiest way to do this with, say, a shortcut created on your TaskBar is to modify your shortcut (in
%appdata%\microsoft\internet explorer\quick launch\user pinned\taskbar
, or thereabouts) so the target is:that'll do exactly what you're looking for. The
/k
tells it to execute the string but keep the window open (string being your batch file). You can either put vcvars32 somewhere in your path, or specify the whole path to vcvars32.From
cmd /?
:You therefore could add
vcvars32.bat
to one of those AutoRun registry values to have it executed for everycmd.exe
instance (except when/D
is explicitly specified, of course).However, be forewarned that doing this could result in other weird side-effects (for example, it could cause other
.bat
/.cmd
scripts to be run in an environment that they aren't expecting).A workaround that works for some people is to write a batch file and call it
A.BAT
and make a.bat launch vcvars32.bat. Put a.bat on the path and then it's a matter of opening the cmd prompt and typing a and enter and voila, you're set!