Announcement

Collapse
No announcement yet.

Removing Previous Version Installation Using Upgrade Code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Removing Previous Version Installation Using Upgrade Code

    Hi,

    I'm having a problem uninstalling the previous version of our program (version 13.4.2) during the installation of the newest version (version 14.0.0), using version 13.4.2's upgrade code in the "File/Remove Related Programs" feature. Both programs have different upgrade codes and product codes.

    It does actually remove the 13.4.2 program prior to installing the 14.0.0, but one of the 14.0.0 files, "Library.dat", does not get installed during the installation process.. It will get installed if I immediately re-run the 14.0.0 installation a second time and select "Repair". That particular file is set as "Never Overwrite" in the file's component property. And as a test, if I rebuild the 14.0.0 msi file with the "Never Overwrite" not selected, it works fine when I redo the entire scenario again. I checked, and the 13.4.2 uninstall does in fact remove the Library.dat file. That tells me it's a timing issue or something.

    Is there something I can do to make sure that the 14.0.0 part of the installation process sees that that file was deleted by the 13.4.2 uninstall process, so that it knows that it can install that file again?

    Both programs are installed to the same folder, and as the current user.

    Thanks.

  • #2
    I would run the installer with the command line arguments /Lv logfile.txt and create an installation log file, and check if that file is being skipped, and if so, why. Perhaps there is a clue in the log.

    Ulrich

    Comment


    • #3
      Sorry for the delay Ulrich. I created a log file of the version 14.1.0 being installed over an existing 13.4.2. And when I search the log for instances of the file "Library.ini" it shows the following:

      This section of the log is during the removal of the version 13.4.2
      -----------------------------------
      MSI (s) (00:E8) [11:08:13:125]: Executing op: SetTargetFolder(Folder=C:\Users\Jason\AppData\Roam ing\CMH Software\Constructor\Program Files\)

      MSI (s) (00:E8) [11:08:13:125]: Executing op: FileRemove(,FileName=Library.ini,,ComponentId={A45 FF320-3C0C-4F89-AD56-EED7AEDE96C1})

      RemoveFiles: File: Library.ini, Directory: C:\Users\Jason\AppData\Roaming\CMH Software\Constructor\Program Files\

      MSI (s) (00:E8) [11:08:13:125]: Verifying accessibility of file: Library.ini

      MSI (s) (00:E8) [11:08:13:125]: Note: 1: 2318 2:
      -----------------------------------


      'this section is during the install of the 14.1.0 further down in the log:
      -----------------------------------
      MSI (s) (00: DC) [11:08:15:418]: Executing op: ComponentRegister(ComponentId={B8D5C137-B977-486B-BDD1-0C1F8B68691D},KeyPath=C:\Users\Jason\AppData\Roami ng\CMH Software\Constructor\Program Files\Library.ini,State=3,,Disk=1,SharedDllRefCoun t=2,BinaryType=0)

      1: {A4DDF052-9365-488D-95DB-7C031175997F} 2: {B8D5C137-B977-486B-BDD1-0C1F8B68691D} 3: C:\Users\Jason\AppData\Roaming\CMH Software\Constructor\Program Files\Library.ini

      MSI (s) (00: DC) [11:08:15:418]: Executing op: ProgressTotal(Total=1,Type=1,ByteEquivalent=13200)
      -----------------------------------

      No other instances of "Library.ini" appear in the log file.

      And as I mentioned in my initial post, "Library.ini" is the only file being install that is set as "Never Overwrite". And if I remove the setting of "Never Overwrite" in the file's component and then run the install, this file does get reinstalled fine. Which seems to me to be like a timing issue then.

      Thanks for any help on this

      Comment


      • #4
        Okay, I understood the issue you are having but I cannot explain what is happening to cause this. I would try to make this work in a different manner and see if this works better, for example, using a Condition.

        You could place a condition on the component of the file Library.ini, allowing it to be installed only if the product is not yet installed. I did not test this, so I cannot assert if this will work properly for an upgrade.
        Click image for larger version

Name:	SCRN-2018-10-16-01.png
Views:	82
Size:	16.9 KB
ID:	301590


        Again, I am not sure that this will work as needed. Another thing is, if you remove the existing version of the application, and the INI file is part of the previous package, I expect it to be deleted before the deployment of the new MSI package starts. This is how Windows Installer would/should handle this, unless the file is checked as Permanent on this dialog. The file will also not be deleted if it was created during runtime of the application.

        If the latter is the case, you could use a File Search to look for the file, set a property if found, and use that property in a condition on the component for this file, stopping it from being overwritten.
        Click image for larger version

Name:	SCRN-2018-10-16-02.png
Views:	92
Size:	19.2 KB
ID:	301591
        Click image for larger version

Name:	SCRN-2018-10-16-04.png
Views:	95
Size:	17.2 KB
ID:	301593


        MYPROPERTY would receive the full path of the Library.ini file if found in the target folder, or remain with the default value "empty" if not, and the file would be installed only in the latter case.
        Just some ideas how else you could make this work, I hope this helps.

        Ulrich

        Comment


        • #5
          Thanks Ulrich.

          Comment

          Working...
          X