-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installer updates #2364
base: main
Are you sure you want to change the base?
Installer updates #2364
Conversation
1b15834
to
149eeb7
Compare
NSIS is an installer system.
The plugin ExecCmd is not supported and not working anymore. The replacement plugin is ExecDos. While the API of ExecDos looks similar to ExecCmd it behaves in a lot aspects differently. Also some documented functionality like "application output to log file" was not possible to get working. Environment variables as part of the command line are not supported. (Need to be resolved before) Thus, the method used now is where the plugin puts the output on the stack. As workaround for the piping the stack is written to a file. Then the second command is called in a separate call.
This MsgBox was shown for admins only.
When running the installer it attempts first to uninstall MIES for all users and then for the current user. There is a mutex setup that prevents running multiple uninstallers at the same time. However, the waiting logic for the uninstaller process to finish did not work. Thus, when there was a admin/all user installation and due to some reason a user installation then while the all user installation was uninstalled the uninstaller for the current user install started and gave the error. Solution: - Prevent the uninstaller from unpacking a independent executable which allows ExecWait to wait. - Delete uninstall.exe and folder afterwards from installer. See also https://nsis.sourceforge.io/Docs/Chapter3.html at the very bottom. (Note that the executable is uninstall.exe and not uninstaller.exe as written in the docu)
4d2b625
to
8bac10b
Compare
@t-b I noticed that we use the option to exit with an non-zero error level code only on one other location in the installer. I was pondering if we shouldn't actually add that to all cases where we quit early due to e.g. non-fulfilled requirements. Currently this is only caught by the fact that an early abort leaves an incomplete installation. In this change the powershell scripts are called at the end, where it is not immediatly obvious that the installer quit early in silent mode. |
Yes let's do that. |
Review: Looks all good. 8c2db1c (Installer: Write out configuration to json file, 2025-03-06)
bcf4eff (CI: Build release installer as unelevated version, 2025-03-07)
instead?
69062ad (Installer: Execute the ASRL disable script again, 2025-03-07) Rest looks good.
|
JSON file is $INSTDIR/installation_configuration.json The following data is saved: /Installation/User <string> (either "all" or "current") /Installation/WithHardware <number> (either 1 or 0) Added file to repo, such that it is listed in the files that are part of the installation/uninstallation
0e00a14
to
3fe8ba4
Compare
I can not reproduce this. The |
create-installer.sh has this code:
so if I pass an argument I get an user installer but the name has the cis suffix. |
AFAIU we can properly ditch the cis/dev installer as the only difference was the UAC elevation. Which we now don't do anymore in general. |
3fe8ba4
to
45232ca
Compare
d4b17e3
to
1c68eac
Compare
The -cis installer filename suffix for the unelevated installer was removed.
The name was changed in f146d2e (TurnOffASLR: Fix powershell script name, 2024-08-18) but the installer was still trying the old name. And it did not complain.
If the call failed the installer returns error code 1. This allows for the silent case to catch this installation error.
A few macros had to be adapted that used relative jump marks. Relative jump marks are not practical for macros in macros. Thus, the solution through a unique id (caller line number) was added.
The powershell script uses the Set-ProcessMitigation CmdLet. However, when calling powershell.exe from the 32-bit installer the 32-bit powershell is started and it does not support the CmdLet. This commit fixes this by explicitly calling the 64 bit powershell executable.
- The script was only required for 32-bit OS and is now obsolete
Mitigation options are only saved by the process name, such that Igor64.exe is sufficient.
1c68eac
to
e8e1335
Compare
close #2206
If calling one of the powershell scripts fail the installer will now catch that and report through Messagebox (non-silent case).
In any case it will also return errorlevel code 1 then.