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

Recommended Answers

All 4 Replies

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.

I hit post reply twice, so it made my post twice, one after the other.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.