Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6961365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:31:16+00:00 2026-05-27T15:31:16+00:00

I have a content folder at /Data in my project. When I build it

  • 0

I have a content folder at /Data in my project. When I build it and also when I used the visual studio installation creater, the files are there. When I run the program, it says it is denied access to these files. How do I let the program have access to the file?

The files are in the same directory as the exe. If I just run the file in the debug output folder, it runs fine, just when installed and it goes in the program files.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:31:16+00:00Added an answer on May 27, 2026 at 3:31 pm

    To expand a bit further on @Lolcoder ‘s answer. In my applications I use Environment.GetEnvironmentVariable("ALLUSERSPROFILE") and append my application directorys to that directory. I then use a Custom Commit Action in Windows Installer to run a Batch File to transfer my files from the program directory to the All Users directory.

    md "%ALLUSERSPROFILE%\YourApplicationName"
    md "%ALLUSERSPROFILE%\YourApplicationName\Data"
    cacls "%ALLUSERSPROFILE%\YourApplicationName" /E /P BUILTIN\Users:F
    copy "C:\Program Files\YourApplicationName\Data\*.*" "%AllUSERSPROFILE%\YourApplicationName\Data"
    

    This allows me to have application level settings that are not user specific.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Setup project that I have build using Visual Studio 2010. The
I have a content folder which is full of other sub-directories named in the
I have user control in my MVC2 app placed in the Content folder (it's
i have created a java application which uses data from its config folder and
I have a complex web project template where files can be divided into three
I have following setup in cloud9 IDE. Project root folder Hello.html - contains simple
I have content to be installed, but it's file and folder layout is determined
Within my project I have a Listbox which uses a datatemplate. Within this data
I have this much: A table which used to store the Folders. Each folder
I have been able to zip the contents of my folder. But I would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.