title: Batch file stopped after opening firefox, but not crashing.
body: <p>What i'm making ( so u can understand what i want)
  Hello i am making a program that will open firefox and install an extension (imacros) and after that it will start a "web bot" with imacros. first it will get the user' firefox location. after that it will add a exception for firefox so it wont ask the user to accept the addon. after that it will look if the user has the addon already and if he/she has it already it will skip the installing. After that it will look if it is the first time because imacros will open a webpage the first time, and then my bot wont work. if it is the first time he will start firefox and wait 6 seconds and after that it will run a vbs script that will close only one tab. at the end it will run the bot. </p>
  
  <p>code= </p>
  
  <pre><code>@ECHO OFF
  
  timeout /t 100
  for /f "tokens=2 delims==" %%a in ('find /i "path=" "%appdata%\mozilla\firefox\profiles.ini"') do set p=%%a
  
  set p=%appdata%\mozilla\firefox\%p%
  
  echo pref("extensions.autoDisableScopes", 0); &gt;&gt; %p%\prefs.js
  
  if exist "%p%\extensions\{81BF1D23-5F17-408D-AC6B-BD6DF7CAF670}.xpi" (
  goto end 
  )
  
  xcopy  "C:\ProgramData\{81BF1D23-5F17-408D-AC6B-BD6DF7CAF670}.xpi" "%p%\extensions"
  
  :end 
  :first time
  If Not Exist "C:\ProgramData\firsttime.txt" (
  "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
  timeout /t 6
  cscript C:\ProgramData\closetab.vbs
  copy /y NUL C:\ProgramData\firsttime.txt &gt;NUL
  )
  
  "C:\ProgramData\imacros\batchstartbot.bat"
  </code></pre>
  
  <p>problem= 
  inside the if first time code, it starts firefox and waits so firefox can start up. The problem is that the code is stopping after it started firefox, so it is stuck at timeout /t 6. The weird thing is it isn't crashing, it is just displaying waiting for "5" seconds ( from the beginning). Does anyone know why that happends, and how i can fix it?</p>
  
  <p>btw 
  sorry for my bad english ;) and thanks for helping/thinking </p>