Results 1 to 5 of 5

Thread: Program folder on Windows Vista

  1. #1
    Join Date
    Dec 2008
    Posts
    37

    Program folder on Windows Vista

    hi,
    Everyone knows that Windows Vista is no longer advisable to keep the details of an application in the same folder of the executable. I seem to have identified a good place to keep local database, configuration files and other files read / written by the program, in a subfolder of "ProgramData" but I do not think that there is either an environment variable or a function that bullet APIs to this path. Yet InnoSetup allows you to install files using the default constant common appdata (). Someone knows how I can locate the program? Thanks in advance.

  2. #2
    Join Date
    Apr 2008
    Posts
    3,522

    Re: Program folder on Windows Vista

    Code:
     System.Environment.GetFolderPath
    You can identify a large number of system folders, including:

    Code:
      Environment.SpecialFolder.ApplicationData
    namely that relating to application data. The folder is the user currently logged on.

  3. #3
    Join Date
    Dec 2008
    Posts
    37

    Re: Program folder on Windows Vista

    But this returns me something else, namely:C: \ Users \ Arthur \ AppData \ ...

    I was interested to get to C: \ Program Data ie to the folder that happens to the files installed by specifying the constant InnoSetup commonappdata ().

  4. #4
    Join Date
    Apr 2008
    Posts
    3,295

    Re: Program folder on Windows Vista

    With ALLUSERPROFILE get the All Users folder in Document and Settings. AppData instead provides you with the Application Data folder on the user currently logged on. Environ queries with the collection of environment variables that, theoretically, could not be set on another PC. Probably would have better security and better reliability by using the appropriate API to find the Special Folder: PI: Retrieving a Special Folder's location.Using the API you can get the Application Data folder in the All User, then common to all users, with the constant CSIDL_COMMON_APPDATA.

  5. #5
    Join Date
    May 2008
    Posts
    4,085

    Re: Program folder on Windows Vista

    It depends on what data do you refer: ALLUSERSPROFILE \... is the folder for the data common to all users, eg. If you use a local DB, you can put it there. If instead we talk about personal data of AppData, then you should use, or in the My Documents folder of the current user. The difference between the two is that AppData is hidden to the user, and you can get, unless you know how to change the option to make it visible. In the documents, however, the user can see the folder and files that you install. In short, depends on the type of access to the files you want to give to you. Note that in the constant InnoSetup commonappdata () is an internal name, that name does not exist in Windows, as there is the C: \ ProgramData. InnoSetup in the guidance indicates that the constants refer to the same folder: userappdata () & () commonappdata The path to the Application Data folder.

Similar Threads

  1. File or folder is using by another program in windows 7
    By Niyunki Ji in forum Operating Systems
    Replies: 6
    Last Post: 14-03-2011, 03:57 PM
  2. Replies: 4
    Last Post: 19-01-2011, 07:30 PM
  3. Best Windows Vista Optimization program
    By first-born in forum Windows Software
    Replies: 5
    Last Post: 16-11-2010, 07:50 AM
  4. Replies: 3
    Last Post: 13-08-2010, 01:15 PM
  5. A program to scan Windows Vista
    By CLONEOPS in forum Operating Systems
    Replies: 3
    Last Post: 14-10-2008, 02:46 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,661,181.17336 seconds with 17 queries