1

I finally managed to get my application updating through installshield LE, without the user having to uninstall manually first, what I am now wondering is:

  1. Can I get the installer to use the application settings from the previous install, so the users saved settings don't change, causing the user to enter their settings every time there is an update. But at the same time, add any new settings to the config file.

  2. Is there anyway to get the installer to not update certain files, for example, the database file is held in a folder called 'db' inside the program files directory, I obviously don't want the users database getting overwritten with a blank one.

Thank you.

Shaun
  • 175
  • 1
  • 2
  • 8

1 Answers1

0

Im not sure what programming language you are writing in, but I had this concern with a C# application I wrote. I see 2 easy ways of doing it:

1) With C# you can setup application setting variables that get written to an XML file in the users Application Data (on WinXP) directory. The nice thing about this is that writing to and reading from the settings file is really easy through the API:

To save and store a variable:

Properties.Settings.Default.UserName = UserName_txtbox.Text; // save contents of UserName_txtbox to UserName setting variable
Properties.Settings.Default.Save(); // write variable to file

To restore a variable:

UserName_txtbox.Text = Properties.Settings.Default.UserName; //load contents of UserName variable to UserName_txtbox

Because the file that contains these are not included in the installation directory of the application, they are preserved.

If you are using a different programming language, you can try to implement the same concept.

Create a settings file that your program updates externally from the install location. (Perhaps it can be in the install location. Im not sure how your installer "updates". Does it replace files or uninstall the old version and install the new version automatically? Play this this to find out...)

Your settings file can be a simple txt file, a bin file, an XML file, etc. Anything that you can read and parse easily. Then you can load settings from the file when the program loads and save settings to the file when the program exits.

radensb
  • 664
  • 1
  • 7
  • 25