title: WPF SQLite EF "No such table" if run application from startup of shell
body: <p>I have the strange problem. I use SQLite with EF in my WPF application. If the application run via double click of mouse on exe file all works fine. But when I try to start the application via Windows autorun or instead explorer.exe I get exception with "No such [tableName] table" message when I try to get list of users from database. If I run the application manually all works fine.</p>
  
  <p>What is the difference between autorun(or instead explorer.exe) and manually run?</p>
  
  <p><strong><em>Added</em></strong></p>
  
  <p><strong>Cause:</strong> Loris156: I think you are using a relative path and the application working directories are different. Check your directory using Directory.GetCurrentDirectory(). An application in Autorun will have a different directory</p>
  
  <p><strong>Solution:</strong> I checked it. In "autorun mode" application have C:\Windows\system32 path.</p>
  
  <p>Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory) is solves this problem.</p>