InnoSetup error 193 after install Mysql Connector

54 views Asked by At

Good morning... need help... I'm trying to use inno setup. But I don't have much experience in programming.

The idea was... to install the program and in the end, the necessary components for it (.net, mysql connector, mysql server...) There was a program for it (first see if the programs existed and then install it), in any of them (whether it exits or not), the program continues installing...

.net runs very well and is working When I go to install the mysql connector, it initially gave the code 192, it is not valid Win32

After reading some posts, I managed to get around this problem. At this point, the installation window appears. As I already have the connector installed, I will click on cancel... "Are you sure you want to cancel mysql connector?" I click yes... and then click finish. when it should close the mysql installer and return to the program installer, I then receive error 193 %1 is not a valid win 32 application..

I don't know what else I can do... someone can help me? please...

[Run]
Filename: "{app}\dotnet-sdk-8.0.203-win-x64.exe"; Flags: skipifdoesntexist; BeforeInstall: CheckDotNet
Filename: "{app}\mysql-connector-net-8.3.0.msi"; Flags: skipifdoesntexist; BeforeInstall: InstallMySQLConnectorNet
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent runascurrentuser

[Code]
function IsDotNetInstalled(): Boolean;
var
  DotNetVersion: Cardinal;
begin
  DotNetVersion := GetWindowsVersion;
  Result := (DotNetVersion >= $0008000300); // 8.0.3
end;

function IsMySQLConnectorInstalled(): Boolean;
begin
  Result := FileExists(ExpandConstant('{app}\mysql-connector-net-8.3.0.msi'));
end;

procedure CheckDotNet;
begin
  if not IsDotNetInstalled() then
  begin
    MsgBox('A instalação do .NET Runtime 8.0.3 é necessária para continuar. A instalação será cancelada.', mbError, MB_OK);
    Abort;
  end;
end;

[Code]
function IsMySQLConnectorNetInstalled: Boolean;
begin
  Result := RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\MySQL AB\MySQL Connector/Net');
end;

procedure InstallMySQLConnectorNet;
var
  ResultCode: Integer;
begin
  if not IsMySQLConnectorNetInstalled then
  begin
    if not ShellExec('', ExpandConstant('{app}\mysql-connector-net-8.3.0.msi'), '', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
    begin
      MsgBox('Falha ao iniciar a instalação do MySQL Connector .NET 8.3.0.', mbError, MB_OK);
      Abort;
    end;
  end;
end;

function InitializeSetup: Boolean;
begin
  Result := True;
end;
0

There are 0 answers