Closed jonahbeckford closed 2 years ago
The problem seems to be described at https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/how-user-account-control-works#installer-detection-technology :
Installer detection only applies to:
- 32-bit executable files.
- Applications without a requested execution level attribute.
- Interactive processes running as a standard user with UAC enabled.
Before a 32-bit process is created, the following attributes are checked to determine whether it is an installer:
- The file name includes keywords such as "install," "setup," or "update."
We are using a 32-bit installer, even with x86_64 in the name:
$ file setup-diskuv-ocaml-windows_x86_64-0.4.0.exe
setup-diskuv-ocaml-windows_x86_64-0.4.0.exe: PE32 executable (console) Intel 80386, for MS Windows
However, the embedded files (the files that will be installed) are 64-bit:
$ file bin/dkml-install-user-runner.exe
bin/dkml-install-user-runner.exe: PE32+ executable (console) x86-64, for MS Windows
We are in a gray area because:
-install-
in it; Windows is correctly detecting it is an installer.-install--
.Either way, it seems the conditions apply.
One of the conditions from the Problem description is:
- Applications without a requested execution level attribute.
We already embedded a manifest for dkml-install-admin-runner.exe
using https://docs.microsoft.com/en-us/cpp/build/reference/manifestuac-embeds-uac-information-in-manifest?view=msvc-170 level=requireAdministrator
but no manifest was present for dkml-install-user-runner.exe
.
So fix is to explicitly embed a manifest with level=asInvoker
for dkml-install-user-runner.exe
, even though level=asInvoker
is the default, because the Installer Detection Technology may require an explicit manifest.
Works. Closing!
Final comment: This seems like only an issue if dkml-install-admin-runner.exe
was not run by setup.exe. That happens if you already have a compatible MSVC, including when you have a previous partial installation that successfully installed MSVC but failed in the non-admin dkml-install-user-runner.exe
portion.
The previous partial installation describes #2