Skip to main content

Module elevation

Module elevation 

Source
Expand description

Restarting as administrator, for a game folder this account cannot write (P11): what the new instance carries over so nothing is asked twice, and the UAC launch itself.

StructsΒ§

Restart
What a restarted instance resumes from; it opens on scene 3.

ConstantsΒ§

FOLDER πŸ”’
LANGUAGE πŸ”’
PASSED_ON πŸ”’
Developer overrides a restart must keep, or it would talk to another server.
RESTARTED πŸ”’
SECRET πŸ”’

FunctionsΒ§

is_elevated
Whether this process already runs elevated, when offering elevation again would only loop.
quote πŸ”’
One argument as CommandLineToArgvW and Rust’s std::env::args split it back: quoted, with the backslashes before a quote doubled.
restart_elevated
Starts this executable again through UAC; false when the user cancels the prompt or it cannot start, which leaves this instance where it was.