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

  • Home
  • SEARCH
  • 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 52911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:58:51+00:00 2026-05-10T16:58:51+00:00

fellow anthropoids and lily pads and paddlewheels! I’m developing a Windows desktop app in

  • 0

fellow anthropoids and lily pads and paddlewheels!

I’m developing a Windows desktop app in C#/.NET/WPF, using VS 2008. The app is required to install and run on Vista and XP machines. I’m working on a Setup/Windows Installer Project to install the app.

My app requires read/modify/write access to a SQLCE database file (.sdf) and some other database-type files related to a third-party control I’m using. These files should be shared among all users/log-ins on the PC, none of which can be required to be an Administrator. This means, of course, that the files can’t go in the program’s own installation directory (as such things often did before the arrival of Vista, yes, yes!).

I had expected the solution to be simple. Vista and XP both have shared-application-data folders intended for this purpose. (‘\ProgramData’ in Vista, ‘\Documents and Settings\All Users\Application Data’ in XP.) The .NET Environment.GetFolderPath(SpecialFolder.CommonApplicationData) call exists to find the paths to these folders on a given PC, yes, yes!

But I can’t figure out how to specify the shared-application-data folder as a target in the Setup project.

The Setup project offers a ‘Common Files’ folder, but that’s intended for shared program components (not data files), is usually located under ‘\Program Files,’ and has the same security restrictions anything else in ‘\Program files’ does, yes, yes!

The Setup project offers a ‘User’s Application Data’ folder, but that’s a per-user folder, which is exactly what I’m trying to avoid, yes, yes!

Is it possible to add files to the shared-app-data folder in a robust, cross-Windows-version way from a VS 2008 setup project? Can anyone tell me how?

  • 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. 2026-05-10T16:58:52+00:00Added an answer on May 10, 2026 at 4:58 pm

    I have learned the answer to my question through other sources, yes, yes! Sadly, it didn’t fix my problem! What’s that make me — a fixer-upper? Yes, yes!

    To put stuff in a sub-directory of the Common Application Data folder from a VS2008 Setup project, here’s what you do:

    1. Right-click your setup project in the Solution Explorer and pick ‘View -> File System’.

    2. Right-click ‘File system on target machine’ and pick ‘Add Special Folder -> Custom Folder’.

    3. Rename the custom folder to ‘Common Application Data Folder.’ (This isn’t the name that will be used for the resulting folder, it’s just to help you keep it straight.)

    4. Change the folder’s DefaultLocation property to ‘[CommonAppDataFolder][Manufacturer]\[ProductName]’. Note the similarity with the DefaultLocation property of the Application Folder, including the odd use of a single backslash.

    5. Marvel for a moment at the ridiculous (yet undeniable) fact that there is a folder property named ‘Property.’

    6. Change the folder’s Property property to ‘COMMONAPPDATAFOLDER’.

    Data files placed in the ‘Common Application Data’ folder will be copied to ‘\ProgramData\Manufacturer\ProductName’ (on Vista) or ‘\Documents and Settings\All Users\Application Data\Manufacturer\ProductName’ (on XP) when the installer is run.

    Now it turns out that under Vista, non-Administrators don’t get modify/write access to the files in here. So all users get to read the files, but they get that in ‘\Program Files’ as well. So what, I wonder, is the point of the Common Application Data folder?

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

Sidebar

Related Questions

Fellow stackers, I am developing the interface for my iPhone application and I'm in
Hello fellow StackOverflow users (or Stackoverflowers ?): I'm learning-by-coding WPF. I read several articles/saw
I'm looking for fellow users, who are using Xuggler to produce video encoded with
Avast there fellow programmers! I have the following problem: I have two rectangles overlapping
I'm about to start (with fellow programmers) a programming & algorithms club in my
Many years ago I remember a fellow programmer counselling this: new Some::Class; # bad!
Here is an interesting piece of code that my fellow team members were just
Do you think Unit Tests are a good way to show your fellow programmers
I'm working with some code in Visual Studio. My parter-in-crime fellow developer has suggested
A fellow developer and I are putting together a proposal for a new application,

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.