CollapseLauncher / Collapse

An Advanced Launcher for miHoYo/HoYoverse Games
MIT License
1.41k stars 65 forks source link

[Bug]: Unable to completely uninstall launcher #345

Closed 435201823 closed 11 months ago

435201823 commented 11 months ago

Affected Version

1.71.16

Bug Behavior

If the launcher has been upgraded through [Squirrel], uninstalling it will result in incomplete uninstallation. Because Squirrel will save up to two versions of the program, only the one filled in iss will be uninstalled when uninstalling.

Expected Behavior

Complete uninstall

Steps to reproduce

  1. install Collapse 1.71.14
  2. Upgrade to version 1.71.16 via Squirrel
  3. uninstall

Related Issues

No response

Screenshot(s)

No response

Additional Information

I am developing a program. I referred to Collapse's installation and upgrade solution, using Inno setup + Squirrel, but there has been a problem with the uninstallation part. I found that Collapse also has the same problem. The method I'm currently thinking of is to uninstall via squirrel since it uninstalls completely.

435201823 commented 11 months ago

I changed the solution:

  1. Prevent Squirrel from modifying the registry and ensure that users cannot uninstall through Squirrel

    mgr.RemoveUninstallerRegistryEntry();
  2. Add this to iss

    [UninstallDelete]
    Type: filesandordirs; Name: "{app}\*"
bagusnl commented 11 months ago

Heyyooo~

Thank you for your insight on the situation, @neon-nyan currently rewriting the parser and rewirter for the innosetup stuff so I'll redirect your suggestion into him.

Due to IRL situation, he might unable to reply in timely manner so we'll wait.

Thank you again! <3

bagusnl commented 11 months ago

Fixed in 1.72.14 Thank you for submitting enhancement request!