title: 'findstr' is not recognized as an internal or external command, operable program or batch file in R
body: <p>I recently installed <code>PBSadmb</code> package in R and ran the following command line. </p>
  
  <pre><code>compAD('vonb')
  </code></pre>
  
  <p><strong>vonb is my file name</strong></p>
  
  <p><img src="https://i.stack.imgur.com/kGGTu.png" alt="enter image description here"></p>
  
  <p>I think the <code>compAD</code> function requires findstr.exe inside to proceed something but gave me errors instead of working.</p>
  
  <p>So I googled to solve this problem and I found the same question on this same topic (although he/she was using the different program)</p>
  
  <p><a href="https://stackoverflow.com/questions/10244181/findstr-is-not-recognized-as-an-internal-or-external-command">question</a></p>
  
  <p>reading the suggestions in that page, I added a new path "C:\Windows\System32" to the path in environment variables tab in System properties. </p>
  
  <p>But nothing has changed. </p>
  
  <p>Can anyone shed me some light on this problem? </p>
  
  <p>Thank you! </p>
  
  <p>Here's my code. </p>
  
  <pre><code>    ###PBSadmb user's guide! ###180910
  getwd()
  setwd("E:/ADMB/PBSadmb_exercise/vonb")
  getwd()
  
  #check the gcc and programs for your code!
  Sys.getenv()["PATH"]
  #load package
  require(PBSadmb)
  #set the path of the programs (admb, gcc, editor)
  setupAD('NewADPaths.txt') #NewADPaths should be in the right directory!
  
  #checkADopts()
  convAD('vonb') #convert *.tpl to *.cpp
  compAD('vonb') #compile the *.cpp file just created 
  </code></pre>
  
  <hr>
  
  <p>And these are error messages</p>
  
  <pre><code>    &gt; compAD('vonb')
  "adcomp.cmd  vonb" 
  'findstr' is not recognized as an internal or external command,
  operable program or batch file.
  'findstr' is not recognized as an internal or external command,
  operable program or batch file.
  'findstr' is not recognized as an internal or external command,
  operable program or batch file.
  'findstr' is not recognized as an internal or external command,
  operable program or batch file.
  
  *** Compile: vonb.cpp
  g++ -c  -O3 -fpermissive -I. -I"C:\Program Files (x86)\ADMB\include" -I"C:\Program Files (x86)\ADMB\contrib\include" -o vonb.obj vonb.cpp
  In file included from C:\Program Files (x86)\ADMB\include/integrate.hpp:35:0,
                   from C:\Program Files (x86)\ADMB\include/integrate_wrap.hpp:6,
                   from C:\Program Files (x86)\ADMB\include/df1b2fun.h:101,
                   from C:\Program Files (x86)\ADMB\include/Vectorize.hpp:11,
                   from C:\Program Files (x86)\ADMB\include/admodel.h:2937,
                   from vonb.cpp:7:
  C:\Program Files (x86)\ADMB\include/integrate.cpp: In function 'void gauss_kronrod::rdqagie(integr_fn, void*, Float*, int*, Float*, Float*, int*, Float*, Float*, int*, int*, Float*, Float*, Float*, Float*, int*, int*)':
  C:\Program Files (x86)\ADMB\include/integrate.cpp:261:17: error: expected unqualified-id before '=' token
       Float small = 0.0, erro12;
                   ^
  C:\Program Files (x86)\ADMB\include/integrate.cpp:584:2: error: 'erro12' was not declared in this scope
    erro12 = error1 + error2;
    ^~~~~~
  C:\Program Files (x86)\ADMB\include/integrate.cpp:654:12: error: expected unqualified-id before '=' token
        small = .375;
              ^
  In file included from c:\mingw\include\wtypes.h:2:0,
                   from c:\mingw\include\unknwn.h:15,
                   from c:\mingw\include\commdlg.h:470,
                   from c:\mingw\include\windows.h:68,
                   from C:\Program Files (x86)\ADMB\include/fvar.hpp:8760,
                   from C:\Program Files (x86)\ADMB\include/admodel.h:59,
                   from vonb.cpp:7:
  C:\Program Files (x86)\ADMB\include/integrate.cpp:662:22: error: expected primary-expression before 'char'
    if (fabs(b1 - a1) &gt; small) {
                        ^
  C:\Program Files (x86)\ADMB\include/integrate.cpp:662:22: error: expected ')' before 'char'
  C:\Program Files (x86)\ADMB\include/integrate.cpp:670:48: error: expected primary-expression before 'char'
        if (fabs(blist[maxerr] - alist[maxerr]) &gt; small) {
                                                  ^
  C:\Program Files (x86)\ADMB\include/integrate.cpp:670:48: error: expected ')' before 'char'
  C:\Program Files (x86)\ADMB\include/integrate.cpp:691:45: error: expected primary-expression before 'char'
     if (fabs(blist[maxerr] - alist[maxerr]) &gt; small) {
                                               ^
  C:\Program Files (x86)\ADMB\include/integrate.cpp:691:45: error: expected ')' before 'char'
  In file included from C:\Program Files (x86)\ADMB\include/integrate.hpp:35:0,
                   from C:\Program Files (x86)\ADMB\include/integrate_wrap.hpp:6,
                   from C:\Program Files (x86)\ADMB\include/df1b2fun.h:101,
                   from C:\Program Files (x86)\ADMB\include/Vectorize.hpp:11,
                   from C:\Program Files (x86)\ADMB\include/admodel.h:2937,
                   from vonb.cpp:7:
  C:\Program Files (x86)\ADMB\include/integrate.cpp:731:8: error: expected unqualified-id before '*=' token
    small *= .5;
          ^~
  In file included from c:\mingw\include\wtypes.h:2:0,
                   from c:\mingw\include\unknwn.h:15,
                   from c:\mingw\include\commdlg.h:470,
                   from c:\mingw\include\windows.h:68,
                   from C:\Program Files (x86)\ADMB\include/fvar.hpp:8760,
                   from C:\Program Files (x86)\ADMB\include/admodel.h:59,
                   from vonb.cpp:7:
  C:\Program Files (x86)\ADMB\include/integrate.cpp: In function 'void gauss_kronrod::rdqagse(integr_fn, void*, Float*, Float*, Float*, Float*, int*, Float*, Float*, int*, int*, Float*, Float*, Float*, Float*, int*, int*)':
  C:\Program Files (x86)\ADMB\include/integrate.cpp:998:53: error: expected unqualified-id before 'char'
       Float correc = 0.0, erlarg = 0.0, ertest = 0.0, small = 0.0;
                                                       ^
  In file included from C:\Program Files (x86)\ADMB\include/integrate.hpp:35:0,
                   from C:\Program Files (x86)\ADMB\include/integrate_wrap.hpp:6,
                   from C:\Program Files (x86)\ADMB\include/df1b2fun.h:101,
                   from C:\Program Files (x86)\ADMB\include/Vectorize.hpp:11,
                   from C:\Program Files (x86)\ADMB\include/admodel.h:2937,
                   from vonb.cpp:7:
  C:\Program Files (x86)\ADMB\include/integrate.cpp:1359:12: error: expected unqualified-id before '=' token
        small = fabs(*b - *a) * .375;
              ^
  In file included from c:\mingw\include\wtypes.h:2:0,
                   from c:\mingw\include\unknwn.h:15,
                   from c:\mingw\include\commdlg.h:470,
                   from c:\mingw\include\windows.h:68,
                   from C:\Program Files (x86)\ADMB\include/fvar.hpp:8760,
                   from C:\Program Files (x86)\ADMB\include/admodel.h:59,
                   from vonb.cpp:7:
  C:\Program Files (x86)\ADMB\include/integrate.cpp:1367:22: error: expected primary-expression before 'char'
    if (fabs(b1 - a1) &gt; small) {
                        ^
  C:\Program Files (x86)\ADMB\include/integrate.cpp:1367:22: error: expected ')' before 'char'
  C:\Program Files (x86)\ADMB\include/integrate.cpp:1375:48: error: expected primary-expression before 'char'
        if (fabs(blist[maxerr] - alist[maxerr]) &gt; small) {
                                                  ^
  C:\Program Files (x86)\ADMB\include/integrate.cpp:1375:48: error: expected ')' before 'char'
  C:\Program Files (x86)\ADMB\include/integrate.cpp:1396:45: error: expected primary-expression before 'char'
     if (fabs(blist[maxerr] - alist[maxerr]) &gt; small) {
                                               ^
  C:\Program Files (x86)\ADMB\include/integrate.cpp:1396:45: error: expected ')' before 'char'
  In file included from C:\Program Files (x86)\ADMB\include/integrate.hpp:35:0,
                   from C:\Program Files (x86)\ADMB\include/integrate_wrap.hpp:6,
                   from C:\Program Files (x86)\ADMB\include/df1b2fun.h:101,
                   from C:\Program Files (x86)\ADMB\include/Vectorize.hpp:11,
                   from C:\Program Files (x86)\ADMB\include/admodel.h:2937,
                   from vonb.cpp:7:
  C:\Program Files (x86)\ADMB\include/integrate.cpp:1435:8: error: expected unqualified-id before '*=' token
    small *= .5;
          ^~
  
  Error: Unable to build vonb.cpp to vonb.obj
  
  Error: Unable to build.
  
  COMSPEC=C:\Windows\system32\cmd.exe.
  
  PATH=C:\Program Files (x86)\ADMB\bin;C:\Program Files (x86)\ADMB\utilities\mingw\bin;C:\Program Files (x86)\ADMB\bin;C:\MinGW\msys\bin;C:\MinGW\bin.
  
  ADMB_HOME: C:\Program Files (x86)\ADMB
  </code></pre>