none
Can't adding Common Application Data Folder to Setup project RRS feed

  • Question

  • In File System Editor of an Setup project it is not possible to add the special folder CommonAppDataFolder.

    I have a access database file in my project that should be installed once for all users. So I want to put it in the application data folder off all users.

    Any idea how I could do this? Thanks.

    Jo
    Wednesday, December 7, 2005 8:54 PM

Answers

  • Jo, although the CommonAppDataFolder is not inherintly supported by the Visual Studio setup projects it is easy to add.

    Select add new custom folder

    Change the Default Location Property of that custom folder to [CommonAppDataFolder]

     

    Thursday, December 8, 2005 1:48 AM

All replies

  • Jo, although the CommonAppDataFolder is not inherintly supported by the Visual Studio setup projects it is easy to add.

    Select add new custom folder

    Change the Default Location Property of that custom folder to [CommonAppDataFolder]

     

    Thursday, December 8, 2005 1:48 AM
  • Thanks Todd, it works fine!
    JoBig Smile

    If someone do the same, don't forget the [] brackets, if you do so the folder showed up under the TargetDir folder. I also set the Property property to COMMONAPPDATAFOLDER.

    Name: Common Application Data Folder
    AlwaysCreate: false
    Condition:
    Default Location: [CommonAppDataFolder]

    Property: COMMONAPPDATAFOLDER
    Transitive: false


    Thursday, December 8, 2005 11:48 AM
  • Hello,

    If either of you are still monitoring this alias, I need to do the same but everyone needs read/write to the files in this directory.  Do either of you know if the directory is created giving everyone read and write permissions?

    If not is there a way to do this during setup?

    Also, accessing this directory via code?  Do you have to pull the path from a registry key?

    Thanks.

    Sunday, January 22, 2006 8:04 PM
  • The directory exists on machines already.

    You can change permissions through code using custom actions, but I would suggest not doing this to system folders such as all users\application data.

    I would suggest using the users application data, where any user will have read write access to there own data and other users will not affect there settings.  The path should be exposed by the APPDATA enviroment variable.

    Monday, January 23, 2006 7:17 PM
  • Hello Todd,

    Thank you for the response but I need a central file.  My code is an Add-in for Small Business Accounting.  The file is stores IFTA fuel rates for doing reports.  There could be a number of people using the machine in a small business to run reports.  So it needs to be in a central location that everybody has access too. 

    I've figured out how to access the directory using a custom folder and [CommonAppDataFolder]

    I've decided to not change the permissions and require a power user or admin log on to update the rates.

    Thanks.

    Monday, January 23, 2006 7:37 PM
  • I'm getting an error on installation of visual basic express:

    "the application data folder for visual basic express could not be created"

    Where explicitly is this folder supposed to be?  I suppose I could add it myself if I knew where it goes...

    Saturday, February 4, 2006 1:50 AM
  • C:\Documents and Settings\All Users\Application Data
    Saturday, February 4, 2006 3:06 AM