conda / constructor

tool for creating installers from conda packages
https://conda.github.io/constructor/
Other
452 stars 166 forks source link

Win11 Uninstaller does not work from Apps #799

Open dokempf opened 2 months ago

dokempf commented 2 months ago

Checklist

What happened?

Under Windows 11, when triggering an uninstallation from the Apps settings, the installer runs, but shows error messages as below:

323280638-486f03f3-640e-4e62-965e-899215ce8282

When the uninstaller exits, no uninstallation has actually happened.

Executing the uninstaller exe manually works, as does installing through apps on Windows 10.

Conda Info

Constructor version is 3.7.0 (if you suspect this to be a regression, I happily test with older versions).

The project can be found here: https://github.com/ssciwr/helios-installer

Pre-built installers for testing can be found here: https://heibox.uni-heidelberg.de/d/5672545fba1b4185a3be/

Conda Config

No response

Conda list

No response

Additional Context

No response

marcoesters commented 1 month ago

I just tried the 2.0.0a1 Windows installer on a Windows 11 Cloud PC and cannot reproduce your problem. It installed and uninstalled just fine from Apps. During the installation, I chose "Just me" and I chose not to create shortcuts.

Can you tell me more about how you installed the application?

If this happens repeatedly for you, can you show me what you see when you click on "Show details"?

At last, you can open regex and check inside Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\. This should contain your aplication. If it's not there, you will find it under Computer\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\. Check the values there and see if everything looks okay, The UninstallString, for example, should point to the uninstaller without any options.

jaimergp commented 1 month ago

Does your helios uninstaller have pre uninstall scripts defined? What happens if you click on Ignore?

dokempf commented 1 month ago

I am currently on holiday and will give you feedback in the week of June 3rd.

dokempf commented 1 month ago

@marcoesters @jaimergp I came around to test this again and the problem persists on my testing system.

dokempf commented 1 month ago

Right after writing up my feedback, I had one more idea and it turned out to be a big hit: This only happens if I change the default installation path in the installer. When I keep the suggested default, everything works fine. That seems to hint at a wrong path somewhere in the uninstaller generation.

jaimergp commented 1 month ago

Hm, I wonder if there's something off with how $INSTDIR gets exported as an env var for the subprocesses, or maybe the PATH manipulation. See this part of the logic:

https://github.com/conda/constructor/blob/af242246cee02a3063ff6753816eb4d1c0cdd28a/constructor/nsis/main.nsi.tmpl#L1271-L1351

What could have changed in Win11 to break that? 🤔

marcoesters commented 1 month ago

I still can't reproduce it on my Win11 CloudPC, even when installing into %USERPROFILE%\helios_non_default. Here is my OS information via systeminfo:

systeminfo | findstr /B /C:"OS Name" /C:"OS Versi
on"
OS Name:                   Microsoft Windows 11 Enterprise

OS Version:                10.0.22631 N/A Build 22631

Could you tell us the full path as best you can? Do you have any special characters in the path like umlauts or ß or anything like that?

I do agree though that $INSTDIR is somehow not set correctly because the file removal process (via RMDIR) didn't work either. However, $INSTDIR is not set using environment variables, so I'm not sure that's the reason.