title: Why could the behavior of batch script be inconsistent on various computers?
body: <p>I'm writing a batch script to automatically push and pull to git (for reasons I won't go into here).</p>
  
  <p>The script works fine on my PC, but doesn't work on my colleagues computer. It gets to the part where <code>MessageBox.exe</code> asks if you want to commit, but on his PC I then get an error</p>
  
  <pre><code>find : yes : Cannot find the specified file or directory.
  </code></pre>
  
  <p>On my PC the script works just fine. We have the same OS etc, so I don't know where to start.</p>
  
  <p>I know this is a very loose question, and I'm new to scripting in Windows but any hints would be great.</p>
  
  <p>Thank you!</p>
  
  <pre><code>@ECHO OFF
  SETLOCAL ENABLEDELAYEDEXPANSION
  call %~dp0%config.bat
  
  SET scriptPath=%~dp0
  SET file=%1
  
  echo Saving current working directory
  SET cwd=%cd%
  
  echo Loading SSH key (%SSHKey%)
  START "" "%puttyLocation%pageant.exe" "%SSHKey%"
  
  echo Moving to library directory (%libDir%)
  cd /D %libDir%
  
  echo Pulling from git....
  git pull %remoteName%
  
  echo Changing back to the original directory (%cwd%)
  cd /D %cwd%
  %easyPCLocation% %file%
  
  echo Moving to library directory (%libDir%)
  cd /D %libDir%
  
  git status --porcelain
  git status --porcelain &gt; %scriptPath%temp.txt
  
  for %%A in (%scriptPath%temp.txt) do if %%~zA==0 (
      echo.No changes to your library have been made.
  ) ELSE (
      echo Changes have been made to your library. Please push them to git now.
      !scriptPath!MessageBox.exe "Changes have been made to your library.     Please push them to git now.\n\nWould you like up push to git?" "Library updates detected!" YesNo Question Button1 &gt; %scriptPath%temp2.txt
  find "yes" !scriptPath!temp2.txt &amp;&amp; (
      !scriptPath!InputBox.exe "Commit message:" "Updating git..." &gt; !scriptPath!temp2.txt
      set /p commitMessage=&lt;!scriptPath!temp2.txt
      echo !commitMessage!
      git add .
      git commit -a -m "!commitMessage!"
      git push
  ) || (
  echo REMEMBER to push changes manually!!!!
      )
    del !scriptPath!temp2.txt
  )
  del %scriptPath%temp.txt
  
  echo Changing back to the original directory (%cwd%)
  cd /D %cwd%
  
  endlocal
  </code></pre>