title: Running "composer update" within a Windows .bat file
body: <p>I've recently updated my app to use composer for all its dependencies. As part of this, I've  updated my deploy script - a combo of Grunt tasks and a batch file - to include a "composer update" after doing a "git pull". </p>
  
  <p>However, I'm finding that although the composer update runs successfully, none of the commands in the rest of the batch file after that line run. If I take the "composer update" line out, everything else runs fine (but of course I risk having out of date/missing dependencies).</p>
  
  <p><strong>edit:</strong>
  Full .bat file. Without the composer update line, it runs entirely - with it, it skips out to the next part of the deploy process.</p>
  
  <p>This creates a new date-stamped folder in \versions\, updates the repository &amp; updates composer dependencies in the main repo folder, does a git checkout-index into the new version folder, uses xcopy to copy the Vendor folder with composer dependencies to the new version (because it's ignored by git) and then updates some symlinks, including the \current\ symlink which is used by IIS as the site root folder.</p>
  
  <pre><code>@echo off
  For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
  For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b)
  set date=%mydate%_%mytime%
  
  mkdir "C:\inetpub\appname\versions\%date%"
  
  cd "C:\inetpub\appname\repository"
  git pull origin master
  composer update
  git checkout-index -a -f --prefix="C:\inetpub\appname\versions\%date%\\"
  
  cd "C:\inetpub\appname\versions\%date%\\"
  
  xcopy /E /y /q "C:\inetpub\appname\repository\www\app\Vendor" "www\app\Vendor"
  
  del /Q www\app\webroot\files
  rmdir www\app\webroot\files
  
  cd "C:\inetpub\appname\"
  
  MKLINK /D "C:\inetpub\appname\versions\%date%\www\app\tmp" "C:\inetpub\appname_tmp"
  MKLINK /D "C:\inetpub\appname\versions\%date%\www\app\webroot\files" "E:\appname_files"
  
  rmdir current
  MKLINK /D current "C:\inetpub\appname\versions\%date%\www"
  
  appcmd recycle apppool /apppool.name:"Localhost"
  </code></pre>