1

I recently moved my dev environment from Linux to Windows and I want to create a batch script that can launch my development environment.

So I created this script:

cd C:\Users\User1\Documents\projects\pims
.env\Scripts\activate.bat
pserve.exe Mydevelopment.ini --reload

This script kind of runs as expected however once the script launches the virtual environment, it doesn't launch pserve, I'm guessing that is doesn't run any of my script once it enters the virtual environment

Can anyone recommend a fix?

  • 1
    Try with `call .env\Scripts\activate.bat` or `call ".env\Scripts\activate.bat"`. Also use `cd /D ...`. – aschipfl May 08 '18 at 14:34
  • Worked like a charm thank you :) –  May 08 '18 at 17:33
  • Possible duplicate of [The called batch script not returning to the calling batch script](https://stackoverflow.com/questions/33014383/the-called-batch-script-not-returning-to-the-calling-batch-script). Also related: [Several ways to call a windows batch file from another one or from prompt. Which one in which case?](https://stackoverflow.com/q/2607856) – aschipfl May 08 '18 at 19:59

0 Answers0