title: How to set Delphi WebBrowser Base directory different that HTML location
body: <p>I have a Delphi program that creates HTML files.  Later when a button is pressed a TWebBrowser is created and a WebBrowser.Navigate causes the html page to display.</p>
  
  <p>Is there anyway to set the WebBrowser "default directory" so it will always be the location of the Delphi executable not the HTML file?</p>
  
  <p>I do not want to set the Base value in the HTML to a hardcoded value because then when the HTML is ran from another Delphi exe they are not found.</p>
  
  <p>for example:</p>
  
  <p>if the exe is run from D:\data\delphi\pgm.exe then the base location D:\data\delphi\ and the jpgs are at D:\data\delphi\jpgs\</p>
  
  <p>but if the exe is run from: C:\stuff\pgm.exe i want the base location to be C:\stuff\ and the jpgs to be at C:\stuff\jpgs\</p>
  
  <p>So I cannot write a line in the HTML with the base location since when it is ran from another exe it would point to wrong location for that exe.</p>
  
  <p>So I either need to set the base location when I create the webbrowser and before I read the HTML or I need a way to pass into the webbrowser the location where I can then set the base location.</p>
  
  <p>Sorry for being so long-winded but I could not figure out how to saw what I needed.  </p>