title: Where to create/keep secret files for license information/trials on Windows/Mac OS X/Linux?
body: <p>I'm writing a commercial product which uses a simple registration mechanism and allows the user to use the application for a demo period before purchasing.</p>
  <p>My application must somewhere store the registration information (if entered) and/or the date of the first launch to calculate if the user is still within the demo/trial period. While I'm pretty much finished with the registration mechanism itself, I now have to find a good way to store the registration information on the user's disk.</p>
  <p>The most obvious idea would be to store the trial period in the preferences file, but since user tend to delete/tinker with those from time to time, it might be a good idea to keep the registration information in a separate, more hidden file.</p>
  <p>So here's my question: What is the best place/strategy to keep and create such hidden files on  Windows, Mac OS X and Linux? Here is what came to my mind so far:</p>
  <h3>Linux/Mac OS X</h3>
  <p>Most Unix-like systems are rather locked down when it comes to places a user can write files to. In most cases this is only the <code>/tmp</code> directory and the user's home directory.
  I guess the easiest here is probably to create a file with a dot-prefix to make it less visible, then give it a name that won't make it obvious that it's associated with my application.</p>
  <h3>Windows</h3>
  <p>Probably much like Linux/Mac OS X - more recent Windows versions become more restrictive when it comes to file system permissions.</p>
  <hr />
  <p>Anyway, I'd like to hear your ideas and thoughts. Even better if you have already implemented something similar in the past.</p>
  <p>Thanks!</p>
  <hr />
  <h2>Update</h2>
  <p>For me the places for such files is more relevant than the discussion of the question if this way for copy protection is good or bad.</p>