fix(windows): Ensure UAC window comes to foreground

Fixes #3936.

This is a trial change as I am not able to reproduce the problem on my
machine, probably due to timing.

@makarasok, can you please test if this resolves the UAC window not
coming to foreground on your test scenario for #3936?
This commit is contained in:
Marc Durdin 2021-02-01 15:29:06 +11:00
parent 95e086feb9
commit ba9ecb6095

View file

@ -302,7 +302,7 @@ begin
Manager.UpdateProgress('Installing Keyboard', 0, 0);
t := TTempFileManager.Get('.log');
try
if WaitForElevatedConfiguration(Handle, '-log "'+t.Name+'" -s -i "'+FInstallFile+'='+BCP47Tag+'" -nowelcome') = 0 then
if WaitForElevatedConfiguration(GetForegroundWindow, '-log "'+t.Name+'" -s -i "'+FInstallFile+'='+BCP47Tag+'" -nowelcome') = 0 then
begin
// install the keyboard tip
if not InstallTipForKeyboard(BCP47Tag) then