Question Problem with Setup Project in Visual Studio 2010

jsoldi

New member
Joined
Oct 5, 2010
Messages
1
Programming Experience
1-3
I'm trying to create a Setup for my app using the Setup Project wizard in Visual Studio 2010. One of the files I added to the Setup Project is a database (.sdf) file that gets installed in the same folder as the main executable file. The problem is that when I try to run the app after I install it, I get an "Access to the database file is not allowed" error message. If I change the database file's permissions after installed, I can run the program successfully. But that should be done by the installation program. I also tried adding a manifest file to my app, and then rebuild and reinstalled. This way it worked but I had to accept an annoying security message box every time I run the application. So, is there any way to program the installer to copy the file with full permissions?
 
The simple answer is to not put the database in the program folder. Put the database under the appropriate application data folder and there will be no permission issues.

If you do want to do any extra work, like change file permissions, during an installation then you will need to add a Custom Action to your project, which you would do after the wizard has finished.
 

Latest posts

Back
Top