Hi, the desktop is not yours, it belongs to the user. this is what I do most often: 1. Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) returns the path of an existing and writable folder for such purposes (the result varies with the Windows version, no worries); what I do is create a subfolder in there, normally I use my app's name for that. 2. create a daily log file in there, with a name that contains the date (appname_20091125.log) 3. automatically delete all log files older than X days 4. provide a Button that opens Windows Explorer on that folder, so user can locate and see them and/or provide a Button that e-mails a copy of the most recent log file (must be a copy since logging has to continue while e-mailing). :)
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
modified on Wednesday, November 25, 2009 3:50 PM