build(loader): request UAC elevation via requireAdministrator manifest
OpenZenLoader.exe now ships with a requireAdministrator manifest instead of asInvoker. The Windows loader prompts for UAC consent once at launch, which: - guarantees OpenProcess / VirtualAllocEx / CreateRemoteThread succeed against javaw.exe when the Minecraft launcher (HMCL, MultiMC) was itself started elevated, - avoids the silent injection failure observed on locked-down standard user accounts. The EXE also picks up the UAC shield overlay on its file icon. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -45,7 +45,13 @@ set_target_properties(OpenZenLoader PROPERTIES
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
# requireAdministrator: ensures the loader can OpenProcess /
|
||||
# VirtualAllocEx / CreateRemoteThread against javaw.exe even when the
|
||||
# Minecraft launcher (HMCL, MultiMC) was itself started elevated, and
|
||||
# avoids the silent injection failure that happens on locked-down user
|
||||
# accounts. The user will see one UAC consent prompt when launching
|
||||
# OpenZenLoader.exe.
|
||||
set_target_properties(OpenZenLoader PROPERTIES
|
||||
LINK_FLAGS "/SUBSYSTEM:WINDOWS /MANIFESTUAC:\"level='asInvoker' uiAccess='false'\""
|
||||
LINK_FLAGS "/SUBSYSTEM:WINDOWS /MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\""
|
||||
)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user