Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CurrentUserApplicationData and version changes

Status
Not open for further replies.

BKQc

Programmer
Jul 26, 2002
118
CA
Hi,
I'm doing a WPF application that uses
Code:
My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData
to store a local xml database. When you use this function, the path returned uses formating
Code:
String.Format("{0}\{1}\{2}\{3}", basePath, CompanyName, ProductName, ProductVersion)
Anyone knows to handle this when changing version number and needing to keep old data?

Thanks!
 

If there is data that you need to keep across versions, you could put it in the ProductName folder. Then you don't need to worry about the version directories.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Yeah, I agree but I thought maybe there was a reason I was missing that explained while it defaults to that pattern *using version number). But if there's not, you're right I could use

Code:
Io.Path.Combine(My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData, "..")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top