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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -