I have a small desktop application that contains 4 text files that I will use as configuration files. I added those files to the Application Folder along with the Primary Output for the project.
Everything works great. However, after I install I can not update the text files in the folder where the application is installed.
Is there a setting where I can make this read-write? Or is it more of a Windows permission issue?
If I set the application to look for a folder in the C Drive (i.e. c:\foldernamegoeshere) would that work better? I think it would be better to have the files r/w where they get installed versus having to tell the user to create a folder and then add the files to the folder etc.
Any ideas on how to get it all done using the setup deployment project?
Keep them reaodonly in the app folder and use commonappdata or user-appdata folder for the writable version… when the app starts it check whether the files exists in the writable folders – if not copy them from app folder, otherwise just use them
you can use any of
ApplicationData/CommonApplicationData/LocalApplicationDatafromEnvironment.SpecialFolderin a call toEnvironment.GetFolderPath ()and then just implement the logic from above…MSDN reference: http://msdn.microsoft.com/en-us/library/system.environment.specialfolder.aspx