/**
  * Secondary method for browser discovery.
  *
  * <p>Uses IE to get the path to the Program Files directory; then gets a list of the sub dirs and
  * checks them against the remaining browsers.
  *
  * @param iePath String
  * @param browsersAvailable Map
  * @param tmpBrowsersToCheck List
  */
 private Map processFilePathsForBrowsers(List tmpBrowsersToCheck) {
   logger.debug("finding available browsers in program files path");
   logger.debug("browsers to check: " + tmpBrowsersToCheck);
   Map browsersAvailable = new HashMap();
   File progFilesPath = getProgramFilesPath();
   if (progFilesPath != null) {
     logger.debug("program files path: " + progFilesPath.getPath());
     File[] subDirs = progFilesPath.listFiles(new DirFileFilter());
     int subDirsCnt = subDirs != null ? subDirs.length : 0;
     // create and populate map of dir names to win browser objects
     Iterator iter = tmpBrowsersToCheck.iterator();
     Map dirNameToBrowser = new HashMap();
     while (iter.hasNext()) {
       WindowsBrowser wBrowser = (WindowsBrowser) iter.next();
       dirNameToBrowser.put(wBrowser.getSubDirName(), wBrowser);
     }
     // iterate over subdirs and compare to map entries
     for (int idx = 0; idx < subDirsCnt && !tmpBrowsersToCheck.isEmpty(); idx++) {
       if (dirNameToBrowser.containsKey(subDirs[idx].getName())) {
         WindowsBrowser wBrowser = (WindowsBrowser) dirNameToBrowser.get(subDirs[idx].getName());
         // need to search folder and sub-folders for exe to find
         // the full path
         String exeName = wBrowser.getBrowserApplicationName() + ".exe";
         File fullPathToExe = findExeFilePath(subDirs[idx], exeName);
         if (fullPathToExe != null) {
           logger.debug(
               "Adding browser " + wBrowser.getBrowserDisplayName() + " to available list.");
           wBrowser.setPathToExe(fullPathToExe.getPath());
           logger.debug(wBrowser.getPathToExe());
           // adding display and exe for backward compatibility and
           // ease of use if someone passes in the name of an exe
           browsersAvailable.put(wBrowser.getBrowserDisplayName(), wBrowser);
           browsersAvailable.put(wBrowser.getBrowserApplicationName(), wBrowser);
           tmpBrowsersToCheck.remove(wBrowser);
         }
       }
     }
   }
   return browsersAvailable;
 }