shell - VBScript Run/Exec setting environment once and reusing -
is there way have run or exec preserve environmental variables after each call?
for example, call vcvars32
lot of configuring of paths , whatever:
shell.run "vcvars32.bat", 0, true
then i'd able call msbuild
in configured environment:
shell.run "msbuild.exe example.sln /t:rebuild /p:configuration=""debug|win32""", 0, true
is possible?
the alternative find create combo batch script both commands , call instead. seems wasteful if need call setup script each time, great have environment set once , reuse it.
put calls vcvars32.bat , msbuild.exe in 1 batch file. use call
call vcvars32.bat , preserve environment. pass sln , other arguments batch file , retrieve them using %1, %2, %3, etc. remember put quotes around them if needed.
it's not clean having in 1 vbs file, it's simplest way.
Comments
Post a Comment