title: What is the best deployment approach for WPF applications with local database?
body: <ul>
  <li>I want to make a <strong>WPF</strong> application that exists in <strong>one directory</strong> including all files that it needs: <strong>.exe</strong>, <strong>.mdf</strong> database, <strong>.xml</strong> config files, etc.</li>
  <li>the application should work <strong>no matter</strong> what directory it is in so that it supports this <strong>scenario</strong>:
  
  <ul>
  <li>person 1 <strong>executes</strong> the application in <code>c:\temp\wpftool.exe</code></li>
  <li>the application reads and writes to the <code>c:\temp\wpftool.mdf</code> <strong>database</strong></li>
  <li>person 1 <strong>zips</strong> up that directory and sends it to person 2 via e-mail</li>
  <li>person 2 <strong>unzips</strong> it to <code>c:\Users\jim\documents\checkout\wpftool.exe</code>, the application reads and writes to the same database in that directory (<code>c:\Users\jim\documents\checkout\wpftool.mdf</code>)</li>
  <li>person 2 <strong>zips</strong> the directory up again and sends it back to person 1 to <strong>continue</strong> making changes on it</li>
  </ul></li>
  </ul>
  
  <p><strong>What is the best way to create a WPF application that supports the above scenario?</strong>, considering:</p>
  
  <ul>
  <li>there should be <strong>no</strong> <strong>hard-coded</strong> database connection strings</li>
  <li>what is the best <strong>deployment</strong> <strong>method</strong>, click once? or just copy the .exe file out of the /release directory?</li>
  <li><strong>reasonable security</strong> so that users have to log in based on passwords in the database, and if a third person happens to intercept the e-mail, he could not easily look at the data in the database</li>
  </ul>