Ver Mensaje Individual
  #4  
Antiguo 28-07-2023
identsoft identsoft is offline
Miembro
 
Registrado: abr 2006
Posts: 282
Reputación: 19
identsoft Va por buen camino
Si lo que quieres es ver la versión del ejecutable, te pongo una función que devuelve dicha versión.
Esta función, creo que la saqué del club delphi ( o de alguno de sus miembros).
Hay que pasarle como parámetro la ruta donde esté el ejecutable.

Código Delphi [-]
function TfrmMain.VersionExe(const ruta: string) : string;
var
  Pt, Pt2: Pointer;
  Size, Size2: DWord;
  ruta_aux : string;
begin
  Result := '';
  ruta_aux := ruta + 'NOMBRE DEL EJECUTABLE.EXE';
  if not FileExists(ruta_aux) then Exit;
  Size := GetFileVersionInfoSize(PChar(ruta_aux), Size2);
  if (Size > 0) then begin
    GetMem(Pt, Size);
    try
      GetFileVersionInfo(PChar(ruta_aux), 0, Size, Pt);
      VerQueryValue (Pt, '\', Pt2, Size2);
      with TVSFixedFileInfo (Pt2^) do begin
        Result :=
        IntToStr(HiWord(dwFileVersionMS))+'.'+
        IntToStr(LoWord(dwFileVersionMS))+'.'+
        IntToStr(HiWord(dwFileVersionLS))+'.'+
        IntToStr(LoWord(dwFileVersionLS));
      end;
    finally
      FreeMem(Pt);
    end;
  end;
end;

Espero que te sirva
Saludos
Responder Con Cita