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

Need to run patch to times to be effective


5 replies to this topic

nutzzz

nutzzz
  • Full Members
  • 6 posts

Posted 11 July 2007 - 15:30

Hi everyone,

I got a problem with a patch I just generated for my MSI Installer. The tool i used is MsiMsp, using library PatchWiz.
The patch works well, however, in order to be effective (file updated in the program files directory), I need to have it run in a specific sequence :

- First launch the .msp. It asks me to repair, ok, and then finishes after 5-10 secs and 2 progress bars. At this step nothing is updated in my application.
- If I run once again the .msp, same result.
- Second step, I run my application with the desktop shortcut (this shirtcut call the MSI, not directly the exe), but just like before applying the patch, it has not been updated.
- Then I launch the .msp again. It asks me to repair, ok, but then it finishes after ~20secs and 3 progress bars. Here my application has been updated.
- I run my app and all has been updated and is working fine !

Does anybody got an idea of what could cause this, particularly what happens during the first update that does not update program files ?

Thanks a lot !

nutzzz

Edited by nutzzz, 11 July 2007 - 15:42.


nutzzz

nutzzz
  • Full Members
  • 6 posts

Posted 11 July 2007 - 17:41

Well, seems like I got some clues.
I used a software to compare the application's program files directory before and after the patch install.
- After the patch is applied for the first time, nothing is changed.
- After the application is run, using an advertised shortcut, msiexec updates the application and 3 additional files are added in the directory and subdirectories.
- After the patch is applied for the second time, all files that needed to be updated are updated.

So, as a conclusion I can tell that the reason why the patch is not completly applied the first time is that some files in the patch are new for the application, and the application has to update itself to install these files itself. Then the patch can provide all its updates.

I use a small upgrade, using a .msp patch, so do you thing these is why that happens ?

Can somebody light me up ?

Thanks

akerl

akerl
  • Full Members
  • 104 posts

Posted 11 July 2007 - 17:48

What kind of patch have you got created (MSI3 or MSI2. In other words, have the patch the table MsiPatchSequence). Is it possible to install the patch when the property MSIENFORCEUPGRADECOMPONENTRULES or the policy EnforceUpgradeComponentRules is set.
- Look into the EventLog to find informations about missing components.
- Create a verbose log (/l*vx) while patching. Look for problems or give me the log for analyzing.

Andreas Kerl

Inside Windows Installer 4.5
ISBN 3-86645-431-7


nutzzz

nutzzz
  • Full Members
  • 6 posts

Posted 11 July 2007 - 18:14

Thank you akerl for reply.

I use MSI 2.0 so my patch does not have any table name MsiPatchSequence.

I juste read from this document that "A patch can upgrade only the files that are already installed locally on the target system". This is not the case in my patch as it carries also new files for the application.

The command line I run is msiexec /l*vx patch.log /qb /p patch.msp

Here are some lines from the end of the log file that may be suspicious :

MSI (s) (08:A0) [19:04:30:265]: Note: 1: 1728
MSI (s) (08:A0) [19:04:30:265]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (08:A0) [19:04:30:265]: Note: 1: 2262 2: Error 3: -2147287038

MSI (s) (08:A0) [19:04:30:281]: Attempting to delete file C:\WINDOWS\Installer\c668aad.msp
MSI (s) (08:A0) [19:04:30:281]: Unable to delete the file. LastError = 32

And these are messages from the EventLog :
The first run of the patch is successful.
The app self update states of an error (does not find product {GUID})
The second run of the patch is also successful



akerl

akerl
  • Full Members
  • 104 posts

Posted 12 July 2007 - 08:00

Please make a test with the following commad line to apply the patch:

CODE
msiexec /p patch.msp /l*vx patch.log /qb REINSTALL=All REINSTALLMODE=omus

Andreas Kerl

Inside Windows Installer 4.5
ISBN 3-86645-431-7


nutzzz

nutzzz
  • Full Members
  • 6 posts

Posted 12 July 2007 - 08:31

This leads to the same result.

If I drop from the newer MSI installer the 3 files that did not exist in previous installer, the patch works fine when run once.

Anyway, do you know the command line to do the equivalent of clicking an advertised shortcut (this force the application to check if it is up-to-date before starting the exe), so I can build a launcher running exactly the three commands I need for the application to be fully updated ?