There is no secure way to do this but I highly suggest not putting your text file in the same execution path as the application. If you do so and install under Vista, it will not work. It will also not work on 2000, XP, 2003 or 2008 depending on the security settings of the OS.

As for a good way of doing this? I would say creating an application that launches your standard application. This "launcher" would pass data to the application telling it if it can launch or not (perhaps a salted hash with partial time?). Once the launcher determines that the trial has expired, it replaces' the executable with a permenantly locked-in-expired-trial version of it so once it expires, someone can't just change a value and fix it.

Again, all of these options have tradeoffs and someone can easily use a profiler and figure out what text file your application modifies on launch.