Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

environment variable of visual studio path?

Thanks for reading this thread.

Basically I am wondering how I can use relative path/environment variable pointing to visual studio 2012 vcvarsall.bat file in a script?

I am currently using absolute path:

call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86_amd64

How can I do something like this?

call "$(System)\$(Program Files)$(VS)\$(VC)\vcvarsall.bat" x86_amd64

Thanks a lot.

EDIT

What if I have more than one version of visual studio? I have vs2008 and vs2012 both installed on my computer.

like image 811
Ono Avatar asked Oct 31 '25 17:10

Ono


1 Answers

Using a Visual Studio macro VCInstallDir

call $(VCInstallDir)vcvarsall.bat

Or without Visual Studio macros use VS110COMNTOOLS

call $(VS110COMNTOOLS)..\..\VC\vcvarsall.bat
like image 83
David Ruhmann Avatar answered Nov 03 '25 01:11

David Ruhmann



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!