3

Sometimes when we issue an upgrade to our application we need to install some files to the application's Data folder. We want to make it possible for the users to move this folder to a place of their liking. But how to deal with this at install time? I was thinking of deploying to the user's AppData folder and have the application somehow check there for new files at startup.

Any advice or references would be very welcome!

We use InnoSetup for a VB6 application if that matters for your answer.

Dabblernl
  • 15,831
  • 18
  • 96
  • 148

2 Answers2

2

Generally the best solution I've found is to allow the user to move the folder from within the application.

This allows the application to keep track of where its data is being kept (by adding a reference to it in a file or registry entry which it accesses at load time) and to access it seamlessly in the future.

Your update routines can then also access this information to determine where to place the update files.

Alternatively, make sure the folder name is as distinctive as possible and add a search routine to look for the directory in a number of sensible places at load time. Then write your manual specifying that the data folder can be moved to one of those locations ONLY.

TonyD
  • 111
  • 2
  • 2
    it is not good practice to use the registry for application specific data. A local config file, probably an .ini for a VB6 application, is more appropriate. – ProfK Feb 19 '11 at 13:48
  • @ProfK I know its bad practice to use the registry, but it doesn't stop people doing just that! Personally I tend to use xml config files, but that's 'cos I'm a java programmer and I like xml. :) – TonyD Feb 20 '11 at 19:29
  • a problem of using registry entries is that they may not be visible: the installer uses administrator rights and the program itself usually does not. – Dabblernl Dec 21 '12 at 11:30
1

Wouldn't the users just run an update or patch package? I'm not sure why they'd want or need to see such files. It's pretty rare for commercial software to offer users the options of where to store program settings and other internal-use files.

Give some thought to this before putting a lot of stuff into users' roaming profiles. You might want LocalAppData instead.

Bob77
  • 13,167
  • 1
  • 29
  • 37
  • We DO want to use LocalAppData, but we don't as yet ;-) As it is not compulsory for our users to follow each update (they can skip them) we have to take into account that the data can be stored at serveral places for the unforseeable future – Dabblernl Feb 20 '11 at 21:31