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

Upgrade \ Update Installation


6 replies to this topic

Eladf

Eladf
  • Members
  • 4 posts

Posted 20 May 2001 - 16:17

Hi

I have a problem with my Update \ Upgrade install, all my file groups Overwrite property are on
NEWERDATE mode so only newer files are being installed on a previous version,
but sometimes the files on the PC are newer than the one in the Setup
( for example when updating ini files on the PC manually )
in this case the setup will not update these ini files because the one in the Setup isn't newer.

So I want to add an option so the user can decide if he wants to update all the ini files.
I believe that I will need to change the Overwrite property of the filesgroup at run time, Is that possible ?
Does any one has a better idea ?

Thanks
Elad.


Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

Posted 21 May 2001 - 09:44

Hi Elad,

I don't believe you can override the Overwrite attribute. However, a way to overwrite your ini-files:

- Put the ini-files in a seperate File-group, with 'ALWAYS' Overwrite.
- Create a new component, and assign the filegroup with ini-files to it.
- In OnMaintUIBefore ask if the user wants to overwrite the ini-files, and if so use ComponentSelectItem to add the inifiles-component to the setup.

Ide


Eladf

Eladf
  • Members
  • 4 posts

Posted 11 November 2001 - 17:06

Hi

This is a good idea ( and it even work ) but Now I want to show the user the different between the 2 ini files and let him decide if he want to update the file or leave it as it is.
I though I will use the SdShowFileMods dialog to display the changes but what is the best way to get the different between the files ???

Elad


Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

Posted 12 November 2001 - 10:20

Hi Elad,

I'd say the easiest way is reading your new MyApp.ini into a list, say listNewIni.
Read the old MyApp.ini in list listOdIni.

Loop through listOdIni, and remove all lines in listOdIni from listNewIni. Afterwards, you'll be left with all additional lines to be added to MyApp.ini

If you've trouble with the lists, there are list-handling scripts here on InstallSite in the "IS5/6 samples > Components and FIles > Component and List Functions"

Success, Ide


Giurcanu Daniel

Giurcanu Daniel
  • Members
  • 51 posts

Posted 15 November 2001 - 13:15

The best solution concerning INI file maintenance is to create/update/ovewrite them directly from script.


Eladf

Eladf
  • Members
  • 4 posts

Posted 03 December 2001 - 09:46

Hi

It might be a silly questions but...

1. How do I get the content of a new ini file that wasn't installed yet
Should I take it directly from the Cab file ? How ?

2. Is there a way to pass a LIST ( That hold the content of an INI file )
created in Install Shield as a argument to another program such as Perl ?
If not with a list then How ?

Elad


Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

Posted 03 December 2001 - 10:05

1 - You got 2 options here ->
A) don't put the new ini-file in the .cab file by setting the 'Compressed' Proprty of its filegroup to 'No', so you can read it directly from CD
B) specify SUPPORTDIR as destination, and read the ini-file from there.

2 - I don;t know of any other way than having Perl read the inifile itself.

Ide