Hi all,
I'm fairly new to programming windows so I hope this question doesn't sound stupid. I'm working on a Windows Forms App that can save and load data to a .txt file for the program with StreamReader and StreamWriter. It works fine whenever I run the program from the .exe, however whenever I package the program in the setup project and install it on my Vista computer, I get a data access denied error for the file when trying to save. Loading from the file still works fine. Also, this error does not appear when I install the program on a Windows XP machine. Any ideas?
The file can be moved anywhere. Thanks for that thread. The program will write correctly if I run it as an administrator, so it must just be the security issues.
Edit:
Moved the file to CommonApplicationData. Fixed the problem.