if EsWindows64Bits then begin if not FileExists('C:\Windows\SysWOW64\WebView2Loader_x86.dll') then
begin
if not FileExists(psRutaRaizServer+'WebView2Loader_x86.dll') then
exit;
Destino := 'C:\Windows\SysWOW64';
ZeroMemory(@FO, SizeOf(FO));
FO.Wnd := 0;
FO.wFunc := FO_COPY;
FO.pFrom := PChar(psRutaRaizServer+'WebView2Loader_x86.dll' + #0);
FO.pTo := PChar(Destino + #0);
FO.fFlags := FOF_NOCONFIRMATION or FOF_NOCONFIRMMKDIR;
if SHFileOperation(FO) <> 0 then
Application.MessageBox(PChar('Hubo un error con WebView2Loader_x86.dll'), PChar(csNombrePrograma),MB_OK + MB_ICONERROR)
else
lbTerminar:= true;
end;
if not FileExists('C:\Windows\SysWOW64\WebView2Loader_x64.dll') then
begin
if not FileExists(psRutaRaizServer+'WebView2Loader_x64.dll') then
exit;
Destino := 'C:\Windows\SysWOW64';
ZeroMemory(@FO, SizeOf(FO));
FO.Wnd := 0;
FO.wFunc := FO_COPY;
FO.pFrom := PChar(psRutaRaizServer+'WebView2Loader_x64.dll' + #0);
FO.pTo := PChar(Destino + #0);
FO.fFlags := FOF_NOCONFIRMATION or FOF_NOCONFIRMMKDIR;
if SHFileOperation(FO) <> 0 then
Application.MessageBox(PChar('Hubo un error con WebView2Loader_x64.dll'), PChar(csNombrePrograma),MB_OK + MB_ICONERROR)
else
lbTerminar:= true;
end;
end;
if lbTerminar = true then
begin
Application.MessageBox(PChar('Al cerrar este mensaje se cerrará el sistema. al volver a entrar se terminarán de instalar los archivos requeridos para el correcto funcionamiento de
este.'), PChar(csNombrePrograma),MB_OK + MB_ICONWARNING);
end;