I followed the steps according to this answer https://stackoverflow.com/a/43899952/7282061 and still could not run tests in windows 7 machine with Firefox 54.0.1 installed. It opened the browser but did not run tests without the Gecko driver.
But it worked without the Gecko driver in a Linux machine that had Firefox 52 and Selenium 2.52, irrespective of whether I set marionette to true or false in DesiredCapabilities!!! Can someone please explain? Selenium 2.52 supports newer Firefox versions without this geckoDriver?