2016-05-04 8 views

Antwort

0

Es gibt keine native Unterstützung dafür.

Sie können einen Timer einrichten und auf Änderungen in der UninstallProgressForm.ProgressBar.Position achten.

Timer ist auch schwierig. Auch hier gibt es keine native Unterstützung. Sie können die InnoTools InnoCallback DLL library verwenden. Die Verwendung einer externen DLL-Bibliothek von einem Deinstallationsprogramm ist jedoch ebenfalls schwierig. Siehe (Ihre) Load external DLL for uninstall process in Inno Setup.

kann der Code wie:

[Files] 
Source: InnoCallback.dll; DestDir: {app} 

[Code] 

type 
    TTimerProc = procedure(h: LongWord; Msg: LongWord; IdEvent: LongWord; dwTime: LongWord); 

procedure TimerProc(h: LongWord; AMsg: LongWord; IdEvent: LongWord; dwTime: LongWord); 
begin 
    Log(Format(
    'Uninstall progress: %d/%d', 
    [UninstallProgressForm.ProgressBar.Position, UninstallProgressForm.ProgressBar.Max])); 
end; 

function WrapTimerProc(Callback: TTimerProc; ParamCount: Integer): LongWord; 
    external '[email protected]{%TEMP}\innocallback.dll stdcall uninstallonly delayload'; 

function SetTimer(hWnd: LongWord; nIDEvent, uElapse: LongWord; 
    lpTimerFunc: LongWord): LongWord; 
    external '[email protected] stdcall'; 

procedure InitializeUninstallProgressForm(); 
var 
    TimerCallback: LongWord; 
begin 
    if FileCopy(ExpandConstant('{app}\innocallback.dll'), 
       ExpandConstant('{%TEMP}\innocallback.dll'), False) then 
    begin 
    TimerCallback := WrapTimerProc(@TimerProc, 4); 
    SetTimer(0, 0, 100, TimerCallback); { every 100 ms } 
    end; 
end; 

Für eine andere Lösung (besser aber komplizierter zu implementieren), siehe How keep uninstall files inside uninstaller?

Verwandte Themen