[RESOLVED]|[Inno 5.2] Uninstall before Install
Hi,
I'm using Inno Setup (5.2) for updating my software. Setup detects previous installation files and replaces them correctly. If no installation is found setup quits.
However, now I need to modify my Inno Script which will proceed with upgrade as usual but should uninstall previous installation first. I think it will be done by adding "silentuninstall" somewhere in the script but I've never did this. Can someone help me with a sample? or an example link?
I think this should be done in CurStepChanged(ssInstall) but have no idea how to proceed...
Thank you!
Re: [Inno 5.2] Uninstall before Install
Here is what I was able to find:
PHP Code:
procedure CurStepChanged(CurStep: TSetupStep);
var
ResultCode: Integer;
Uninstall: String;
begin
if (CurStep = ssInstall) then begin
if RegQueryStringValue(HKLM, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\MyProgram_is1', 'UninstallString', Uninstall) then begin
MsgBox('Warning: Old Version will be removed!', mbInformation, MB_OK);
Exec(RemoveQuotes(Uninstall), ' /SILENT', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
end;
end;
end;
If you have other suggestions, comments, please share.
Re: [Inno 5.2] Uninstall before Install
Did this solve the issue for you?
Re: [Inno 5.2] Uninstall before Install
Quote:
If you have other suggestions, comments, please share.
One would deduce that more input is desired. :D
Re: [Inno 5.2] Uninstall before Install
I hoped to see other proposals, but nothing yet.
And yes, thread will be marked as solved.
Thank you for reading...