Ver Mensaje Individual
  #6  
Antiguo 28-07-2023
Avatar de JoAnCa
JoAnCa JoAnCa is offline
Miembro
 
Registrado: jul 2005
Ubicación: Cuba
Posts: 435
Reputación: 19
JoAnCa Va por buen camino
Cita:
Empezado por identsoft Ver Mensaje
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
Gracias por la respuesta, para la version tambien me sirve, pero tambien necesito el nombre del producto.
__________________
La hora de acción no es hora de aprender, es necesario haber aprendido antes
Responder Con Cita