Database and common setting files location

Posted on 2011-10-16
Last Modified: 2013-11-26
I have a .NET application that uses SQL Server Express. The application automatically creates a database file on first run (after installation) and creates a full backup every day. The application also creates/loads setting/data files which applies for all users.

Note that the application must not need administrative privileges to work.

I have googled a little and found a few folders (Win7), but I'm not sure which one to use
"C:\Program Files\Common Files"
"C:\Users\All Users"

What is the difference between the 3 and when should I use them? The folder (or its equivalent in .NET code) used must be available regardless of the OS (WinXP and above).

Question by:Thomasian
    LVL 22

    Accepted Solution


    Have a look at You can read how you grab the location for the different folders and what to store there.

    But in short:

    "C:\Program Files\Common Files" (CommonProgramFiles): The directory for components that are shared across applications.

    "C:\ProgramData" (CommonApplicationData): The directory that serves as a common repository for application-specific data that is used by all users.

    "C:\Users\All Users": Link to the folder C:\ProgramData.

    If you have user specific data, you can use ApplicationData or LocalApplicationData.

    Also, the Users and ProgramData folders are new in Vista, earlier it was "C:\Documents And Settings" and "C:\Documents And Settings\All Users\Application Data"

    LVL 22

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
    This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
    With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now