Hello I created a setup project for an application. The output goes to the program files folder. I create a shorcut on desktop too.

The thing is that the application works with some text files embeded.

When I run the application and click new there is an error saying that the program files directory is denied.

I mean I think I understand the problem, windows is not letting the application access some files I put in my project, but how can I fix this, I try running as administrator and did not work.

I want the end-user not having to do anything besaides running the installer.

What should I do?

THanks

Unhandled exception has occurred in your application.

Access to the path C:\Program Files (x86)\My Application is denied.

How can overcome that problem?

Thanks

You should be storing any user related data in the Users' AppData folder. You can get the Parent path from the variable Environment.SpecialFolder.ApplicationData which is used in the following way String appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); In there you can create a folder for your application and store/modify any files you wish.

Thanks, I will use click once too.

What u mean with the double post I don't understand.

Thanks again.

This question has already been answered. Start a new discussion instead.