tags:

views:

38

answers:

1

Hello,

I'm writing a tool that may be asked to produce its results in a text file. On Windows 7 I want the tool to install in Program Files, but I obviously can't write there, and asking the user where to save the file is overkill. I was wondering if there's a common practice (a standard folder similar to %AppData%) in which I can write output files.

Thanks,

Oren

A: 

My best practice is something under AppData if the user never needs to see it (eg settings that you have UI to manage) and something under My Documents if the user does need to see it (find it, email it to people, open with another app etc.) However I generally prefer to let the user specify the path in that case, with it just defaulting to something under My Documents. Also, add a button in your app that will open a Windows Explorer to the path where the doc is saved - not much work for you and happier users.

System.Diagnostics.Process.Start(path);

Easy enough, eh?

Kate Gregory