PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
[RESOLVED] Application.UserAppDataPath-VBForums
Results 1 to 4 of 4

Thread: [RESOLVED] Application.UserAppDataPath

  1. #1

    Thread Starter
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Resolved [RESOLVED] Application.UserAppDataPath

    I need a place to store user specific data. I was thinking of storing it into a user's Application Data folder. The problem is, if I use the Application.UserAppDataPath property, it not only returns a path including my company and program, but it also adds the version on the end of the path.

    Is there a built in function to get a path that includes the company/organization, then the application with nov ersion number (that way newer verisons can sitll use the same data)?
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  2. #2
    "The" RedHeadedLefty
    Join Date
    Aug 2005
    Location
    College Station, TX Preferred Nickname: Gig Current Mood: Just Peachy Turnons: String Manipulation
    Posts
    4,495

    Re: Application.UserAppDataPath

    There is the Application.UserAppDataRegistry property that you can supply a registry key to which contains the directory path... but also means you have to create this registry key for each user... (although haven't tried to mess with it myself...)

  3. #3
    "The" RedHeadedLefty
    Join Date
    Aug 2005
    Location
    College Station, TX Preferred Nickname: Gig Current Mood: Just Peachy Turnons: String Manipulation
    Posts
    4,495

    Re: Application.UserAppDataPath

    I knew there was another way.. forgot all about Environment.GetFolderPath... You can play with it in order to see what paths are returned when you use the various specialfolder enumerations... like below gets the "ApplicationData" folder for the current user...
    VB Code:
    1. MessageBox.Show(System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData))
    Just a matter of getting a path that you can use from one of the specialfolder paths, and modifying the string to add in the company info, etc into the string...
    Last edited by gigemboy; Jan 21st, 2006 at 01:00 AM.

  4. #4

    Thread Starter
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: Application.UserAppDataPath

    Thanks. VBForums.com seemed to go down after I posted so I found the answer, and then it came back up. lol

    Thanks though
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width