title: Searching google from a batch file
body: <p>So, to make things simple, I created a batch file that will act as a shortcut menu to reduce space on my desktop. I've added a few extra features too. One of these features is a function that searches Google. I looked up some other topics that have to do with this, and got this change spaces into "+". This worked decently fine until I put the option to go back to the main menu by typing BACK. that function works, but I can no longer search multiple terms. Also, many of my searches bring me to the Google homepage instead. Any ideas?</p>
  
  <p>Here is the portion of the script having to do with this. there IS another tab called menu.</p>
  
  <pre><code>:search
  echo.
  echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++
  echo Google Search
  echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++
  echo.
  echo Please type search word or phrase and press ENTER
  echo To return to the menu, type BACK in all caps.
  echo.
  set /p SC=Search Criteria: 
  if %SC%==BACK goto menu 
  if %SC% NEQ BACK (set string=%SC: =+%) &amp; (start "" /b "C:\Program Files\InternetExplorer\iexplore.exe" "http://www.google.com/search?q=%string%")
  pause 
  echo.
  echo ------------------------------------------------------
  echo Where to?
  echo ------------------------------------------------------
  echo.
  echo 1 - Search again
  echo 2 - Main Menu
  echo.
  echo 3 - EXIT
  echo.
  set /p m=Type 1, 2, or 3 then press ENTER: 
  if %m%==1 goto search
  if %m%==2 goto menu
  if %m%==3 goto close
  </code></pre>