Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

ini file not being written on upgrade


3 replies to this topic

ConfigControl

ConfigControl
  • Full Members
  • 34 posts

Posted 04 December 2001 - 21:40

I am trying to do a major upgrade and a ini file is the only file not being upgraded. I am changing the package code, product code and product version when I build the release. If I install on a system that does not have an older version of the product the ini file is written and is updated just fine. It is only when I run the new setup version and it detects an older version on the system that it removes the old files but never replaces the ini file. I am using the upgrade table to only allow upgrades and not allow downgrades. My settings are:

Upgrade GUID   SameGUID   SameGUID
VersionMin              blank             2.0.4390
VersionMax            2.0.4390         blank
Lang                          blank             blank
Attributes                  1025               1026
Remove                     blank                 {}
ActionProperty     OLDER               NEWER


So has anyone else had this type of upgrade problem?


Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 05 December 2001 - 10:53

You are suffering form the versioning rules.

INI files do not have a version so we are restricted to the date.   Msi does not consider the new file.  It examines the old files creation and modified date.  If the modified date is later than the creation date msi assumes the user has modified the file and is designed not to overwrite the user's settings.

This behaviour is mostly what we want but in your case it is wrong.

I suggest you make the INI file a companion file to a related versioned file rather than its own component.  You will now have the next complication to work around it rules out the ideal late placement of RemoveExistingProducts.

Alternately in your case you can use the INI table to make the changes to your INI file.



ConfigControl

ConfigControl
  • Full Members
  • 34 posts

Posted 06 December 2001 - 20:42

Adding a companion file worked. I was also able to get the file upgraded by changing the properties of the file to NOT USE SYSTEM properties and add an “Alias” version. Now that I have the file being put back in the folder the ini values are not being written to the file. I installed using the log option and the log shows that the WriteIniValues action succeeds and it shows the correct values that should have been written.

Anyone seen this or know a workaround.


ConfigControl

ConfigControl
  • Full Members
  • 34 posts

Posted 07 December 2001 - 18:12

Just to close this what I had to do to get the ini file to update on a major upgrade;

In the IDE “INI File Changes” I had to change the “Target” from [INSTALLDIR]myfolder to [INSTALLDIR]\folder. Don’t know why it needs the backslash between the INSTALLDIR and the folder name but it works.

Along with adding an alias version to the ini file.