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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:17:50+00:00 2026-06-15T10:17:50+00:00

I have an application where I would like to save some raw files in

  • 0

I have an application where I would like to save some raw files in a folder structure on the client’s computer. This EXE is completely stand-alone, and could possibly be running from a CD, or otherwise from a location which is read-only. Therefore, I cannot save my data in the EXE location. I would like to basically “ask” Windows where I should save the files, or save them in the proper location.

Where should I save this data on a client computer somewhat permanently but yet in a location where applications typically store their data? Since this application doesn’t have an installer, I don’t know how the permissions to certain program data folders will work out. I need an example of producing a common path for my application. Any instance of the app running on the same machine should know to look in this one dedicated location for this data.

PS – I mean semi-temporary database because the database is expected to stay in tact for a long period of time, but there’s a possibility it may be erased to clean up, in which case it would automatically create a new one. The data its self can be considered somewhat of a cache.

EDIT

As far as windows user sessions, this is intended to be a global location for any windows session, and this application is actually a service which will be running in session 0.

  • 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-06-15T10:17:51+00:00Added an answer on June 15, 2026 at 10:17 am

    Refer to MSDN CSIDL listing and use the SHGetFolderPath() function.

    Map the CSIDL CSIDL_COMMON_APPDATA to a physical directory.

    From MSDN:

    The file system directory that contains application data for all
    users. A typical path is C:\Documents and Settings\All
    Users\Application Data. This folder is used for application data that
    is not user specific. For example, an application can store a
    spell-check dictionary, a database of clip art, or a log file in the
    CSIDL_COMMON_APPDATA folder. This information will not roam and is
    available to anyone using the computer.

    Beneath this directory, create a directory named after the vendor (your company), and beneath that, a directory for your application. Then put your database in there.

    Note: Don’t use CSIDL_COMMON_DOCUMENTS/ FOLDERID_PublicDocuments. This is for document-like files that can be shared across different applications. For proprietary data, like databases, use CSIDL_COMMON_APPDATA . Also files in CSIDL_COMMON_DOCUMENTS may be ‘roamed’ by the operating system – something you definitely don’t want for a temporary database.

    Note: For Vista onwards use SHGetKnownFolderPath(), but for XP or cross-version, use SHGetFolderPath().

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

Sidebar

Related Questions

I have some default configuration files inside my application jar that I would like
I have a C# console application and would like to add some of the
I have a classic ASP application I would like to add some AJAX-style partial
I have some files in a folder on the harddrive, like C:\ExtraContent\ that has
I have an application I would like to force SSL on the login page
I have an application where I would like to make my reducers (I have
I have an application where I would like to exchange information, managed via Core
i have a swing application that i would like to run on os x
I have an application A that I would like to be able to invoke
I have an application in which I would like to support multiple orientations. I

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.