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 7180759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:24:58+00:00 2026-05-28T17:24:58+00:00

when i am install my application to client machine which have window 7 then

  • 0

when i am install my application to client machine which have window 7 then give me error that db file don’t have read or write permission.

how can i give permission to that file ?

i already read other solution that i should store the db file in shared directories which have read write permission for every user.

but i want to store my database file into my program files folder and want to give permission to that file so it can also work in window 7 .

thanks

EDITED :–

as now all of you suggesting to save the db files in shared folder so my new question is now

how to store .mdf file in shared folder when making setup in c#. what changes should i make in app config file. currently its storing program files in my application folder where my application don’t have read write permission .

currently my mdf file is on root and my app config file have this line of code :

<add name="HotelReservationSystem.Properties.Settings.HotelReservationDBConnectionString"
      connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\HotelReservationDB.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
      providerName="System.Data.SqlClient" />
  • 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-28T17:24:59+00:00Added an answer on May 28, 2026 at 5:24 pm

    Unfortunately after Windows XP this is NOT possible. In order for a user to write to anything in Program Files they need Administrator access. Not only do they need Administrator access but they also need UAC permission.

    So you have to options

    1. Place the database in a read/write folder like ApplicationData
    2. Make your app run as admin UAC rights by adding the setting in app.manifest
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application which uses gtkmm. The client's machine does not have this
a strange behavior happens when install the application and then run the exe file.
I have a WSI installer package that I'm using to install my application. The
I am trying to build a setup file which will install my vb.net application
I have a need to write an client-server application where a tiny server rests
I am developing a Desktop application which we install on client machines but it
I have an application which get copied and run on client machines. The program
I have a legacy VB6 application that was built using MSDE. As many client's
In my application I want to open a file that exists on a client
I want to deploy a client application that uses Oracle's ODP.net but I don't

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.