0

I have a situation where I need to deploy ruby code to lab devices. These machines are slow and very locked down (hard to get files to). They get re-imaged fairly often, but I am not allowed to bake the install into the image. I've solved the problem by using the same open ports for Git code distribution to distribute my install files. I have a long install process boiled down to 3 batch files, but if I could reduce it to one, it would make life a lot easier (not to babysit a lot of installs via VNC). I'm only mentioning all this for reference. The problem: I can't install git and then do a pull from command line without opening a new cmd prompt - I think it pertains to environment variables, but am not 100% sure. I get "git is not recognized" blah blah blah if I don't break out at this point and start the next batch. Same deal when I install ruby and don't break out before starting the DevKit install. Powershell is not an option (I'm only allowed to install Git, Ruby, and the support (DevKit, C++ redistributables, .Net Client 4) and some of the machines do not have it.

I did a version where I scripted reboots and moving the batches into startup progressively - it works, but some of the other machines are tied together in a way that makes rebooting an issue (please don't make me explain - it's complicated lol).

Is there a way to merge my 3 batch files and execute all steps without reboots?

Edit: I have tried starting the next batch from the first (Start... Call...), and even creating a scheduled task to execute the next step. Can't swear I haven't made any mistakes, but they all seem to inherit the initial conditions and don't recognize the "git" command unless a new cmd prompt is opened.

Smaug
  • 1
  • 2
  • Try launching the next batch file using `start "" nextbatchfile.bat` at the end of current batch file, which will use the new environment, presumably. – wOxxOm Jul 14 '16 at 14:30
  • If you have vbscript available, you can use this [answer](http://stackoverflow.com/a/171737/2378643) to pull in the latest system environment variables between installs. – Anon Coward Jul 14 '16 at 19:38

0 Answers0