CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Location
    Springfield
    Posts
    190

    CommonAppDataPath and UserAppDataPath

    Hi everybody,

    my application setup installs some MS Access mdb files, which will be modified during app's execution.

    I thought about installing them in Application.CommonAppDataPath or Application.UserAppDataPath.

    I'm just wondering why do they depend on the ProductVersion?
    e. g. C:\ProgramData\WindowsFormsApplication1\WindowsFormsApplication1\1.0.0.6

    When the application is upgraded, the modified mdb files will still be necessary.

    Where do you suggest me to install the files and why do you think these paths depend on the ProductVersion?

    Roberto
    Mr. Burns

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: CommonAppDataPath and UserAppDataPath

    During the update phase, have your setup program look for the older mdb version and move it into the newer, versioned location.

  3. #3
    Join Date
    Jul 2003
    Location
    Springfield
    Posts
    190

    Re: CommonAppDataPath and UserAppDataPath

    I've got 1Gb of files to move, so I think that this would be a useless waste of time , when these files could be sited always in the same place .

    There's lots of things I could do... for example I could place them in
    C:\ProgramData\WindowsFormsApplication1\WindowsFormsApplication1
    removing characters from the last backslash in the string CommonAppDataPath
    (C:\ProgramData\WindowsFormsApplication1\WindowsFormsApplication1\1.0.0.6)


    I just wanted to know what is the right way to manage this issue and how to handle it in my future applications, since I don't find any reason to put files in a version-dependent folder.

    I would like to know why all these variables contain version-dependend folders. If all my developments contained code that removes the ProductVersion from these paths, I'd feel my code as bad programming.
    Mr. Burns

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured