https://bugs.winehq.org/show_bug.cgi?id=41361
Bug ID: 41361 Summary: MSI uninstaller calls wrong Custom Action and performs wrong action Product: Wine Version: 1.9.19 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msi Assignee: wine-bugs@winehq.org Reporter: reinhold.hoffmann@hotmail.com Distribution: ---
Created attachment 55713 --> https://bugs.winehq.org/attachment.cgi?id=55713 msi with special prepared custom actions to show the bug
In certain situation the MSI uninstaller calls a wrong custom action. When an app is installed and the same app msi installation is called again, this app should be repaired or removed. This is initiated properly but for "Remove" the wrong custom action is called and the software is not removed.
I have prepared a dummy repro based on the installer of Notation Player, please find attached. This repro contains of 4 custom actions.
- Install after the software is installed but not yet registered
- Commit when the software is installed and registered in the Registry just before the end of the installaion process
- Rollback when a Rollback is performed
- Uninstall when an uninstallation is performed.
The custom action of the repro in all cases simply displays which custom action is called.
How to reproduce the failure: ------------------------------
Scenario 1: Installation OK: custom actions Install and Commit are called
Scenario 2: OK: when uninstalling with uninstaller the Uninstall custom action is called
FAILURE situation: ------------------
Perform Scenario 1. Perform Scenario 1 again
Here the according Repair/Remove window pops up. When selecting "Repair" the Install and Commit actions are called. This is correct.
But when selecting "Remove" the Install and Commit custom action are called, too. This is wrong. When selecting "Remove" the Uninstall custom action had to be called and the software needs to be removed. The uninstaller confirmes that the app has been successfully removed. Indeed, the uninstaller shows that the software is removed but it is not. The software is not removed but still exists.
For a sophisticated custom action handling this scenario brings the system into an undefined state. An experienced person is required to fix this situation.
https://bugs.winehq.org/show_bug.cgi?id=41361
Vincent Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase
https://bugs.winehq.org/show_bug.cgi?id=41361
--- Comment #1 from Reinhold reinhold.hoffmann@hotmail.com --- Has anybody had a chance to check this bug report?
https://bugs.winehq.org/show_bug.cgi?id=41361
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #2 from Zebediah Figura z.figura12@gmail.com --- I can't reproduce this with Wine 2.22—if I select 'remove' only the Uninstall action gets called. Please retest with current Wine.
https://bugs.winehq.org/show_bug.cgi?id=41361
Reinhold reinhold.hoffmann@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.9.19 |2.22
--- Comment #3 from Reinhold reinhold.hoffmann@hotmail.com --- There is still an issue but in 2.22 it is different than in 2.11 which was my former package. In 2.22 the issue is even worse than in 2.11.
Scenario: ========= The installation needs to be performed twice in a row. This is what typically an end user does when he receives an update or a new version. He does not uninstalls the former installation.
Behaviour in Wine-2.11: ----------------------- The first installation works fine. For the second installation at the beginning a pop up windows comes up asking for "Repair" or "Remove". When selecting "Remove" the custom action "Uninstall" should be executed but "Install" and "Commit" is executed. When running the regular uninstallation with $ wine uninstaller the custom action "Uninstall" is properly executed.
Behaviour in Wine-2.22: ----------------------- The first installation works fine. For the second installation at the beginning a pop up windows comes up asking for "Repair" or "Remove". When selecting "Remove" the custom action "Uninstall" should be executed but it is not executed at all. The same issue exist when uninstalling the software through $ wine uninstaller that the custom action "Uninstall" is not executed.
In a nutshell: a custom action "Uninstall" is not executed when uninstalling.
Why is 2.22 worse than 2.11? ---------------------------- For Wine 2.11 running $ wine uninstaller executes the custom action "Uninstall" but on Wine 2.22 the is no way to get the custom action "Uninstall" executed.
https://bugs.winehq.org/show_bug.cgi?id=41361
--- Comment #4 from Rosanne DiMesio dimesio@earthlink.net --- (In reply to Reinhold from comment #3)
Behaviour in Wine-2.22:
The first installation works fine. For the second installation at the beginning a pop up windows comes up asking for "Repair" or "Remove". When selecting "Remove" the custom action "Uninstall" should be executed but it is not executed at all. The same issue exist when uninstalling the software through $ wine uninstaller that the custom action "Uninstall" is not executed.
I can't reproduce that. The Notation 3 registry entries are removed and its program files deleted when I select Remove the second time, whether doing it through Wine's uninstaller or directly executing the .msi, and the uninstaller reports success. If I run the .msi a third time, it does a normal install, as would be expected.
However, the uninstaller does leave behind an empty Notation_3 subdirectory in Program Files/Program Files (x86). Is that what makes you think uninstalling isn't working?
https://bugs.winehq.org/show_bug.cgi?id=41361
--- Comment #5 from Rosanne DiMesio dimesio@earthlink.net --- I decided to check whether the uninstaller leaves behind that empty directory in Windows and discovered that the .msi file doesn't work at all in Windows 7. The installer starts, then pops up an error message that says "There is a problem with this Windows installer package. A DLL required for this install could not be run. Contact your support personnel or package vendor."
I then tested it in XP; the .msi does run in XP and doesn't leave behind the empty directory when uninstalling.
https://bugs.winehq.org/show_bug.cgi?id=41361
--- Comment #6 from Zebediah Figura z.figura12@gmail.com --- 0033:trace:msi:ACTION_PerformAction Performing action (L"[Uninstall<=>S-1-5-21-0-0-0-1000<=>{F25A8498-204B-43C2-85CD-B718A4C92C8F}]_BC340B9E_D7E0_4672_B5B6_8A6EA4E29599") 0033:trace:msi:ACTION_CustomAction Handling custom action L"_BC340B9E_D7E0_4672_B5B6_8A6EA4E29599" (c11 L"_EADDBE9BC5E8418FB0B8C9BACC854088" L"_Dll_Install_call_into_Notation_Installation_Preparation@4")
It seems that the Uninstall action is being called just fine on my end as well. Can you attach a +msi,+msidb log?
https://bugs.winehq.org/show_bug.cgi?id=41361
--- Comment #7 from Reinhold reinhold.hoffmann@hotmail.com --- Created attachment 59853 --> https://bugs.winehq.org/attachment.cgi?id=59853 Traces of installation, uninstallation, custom action, test msi
https://bugs.winehq.org/show_bug.cgi?id=41361
--- Comment #8 from Reinhold reinhold.hoffmann@hotmail.com --- I did a more verbose tracing within the custom action.
Please find in the zip: (1) log of installation (2) log of uninstallation (3) test msi (4) source code of custom acion which is called in Install, Commit and should be called in Uninstll phase, too.
But for uninstall it is not called at all. No MessageBox show up.
https://bugs.winehq.org/show_bug.cgi?id=41361
Reinhold reinhold.hoffmann@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
--- Comment #9 from Reinhold reinhold.hoffmann@hotmail.com --- Interestingly the stable version Wine-2.0.3 is OK.
I therefore added "regression" to the keywords.
https://bugs.winehq.org/show_bug.cgi?id=41361
--- Comment #10 from Zebediah Figura z.figura12@gmail.com --- Found the bug—the problem is that the custom action DLL is removed before the custom action tries to execute. I'm not sure why this is traced as a WARN, or why it doesn't return an error...
In any case, this is a legitimate bug and a duplicate of 44036—standard actions need deferral.
https://bugs.winehq.org/show_bug.cgi?id=41361
--- Comment #11 from Reinhold reinhold.hoffmann@hotmail.com --- Many thanks.
https://bugs.winehq.org/show_bug.cgi?id=41361
Rosanne DiMesio dimesio@earthlink.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW
--- Comment #12 from Rosanne DiMesio dimesio@earthlink.net --- With the patch from bug 34989, the "Uninstall" message box appears at the end. The uninstaller still leaves behind the empty Notation_3 subdirectory (possibly related to bug 40232).
https://bugs.winehq.org/show_bug.cgi?id=41361
Rosanne DiMesio dimesio@earthlink.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE
--- Comment #13 from Rosanne DiMesio dimesio@earthlink.net --- Marking duplicate per comment 10.
*** This bug has been marked as a duplicate of bug 44036 ***
https://bugs.winehq.org/show_bug.cgi?id=41361
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Duplicate