From 7652879aad39c2876dfad921092896e53b99b5b9 Mon Sep 17 00:00:00 2001 From: Fredrik Mellbin Date: Tue, 9 Jan 2007 02:15:08 +0000 Subject: [PATCH] fix stupidity in previous commit Originally committed to SVN as r749. --- installer/aegisub.iss | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/installer/aegisub.iss b/installer/aegisub.iss index b5e8f0073..c0a972fef 100644 --- a/installer/aegisub.iss +++ b/installer/aegisub.iss @@ -107,7 +107,7 @@ var InstalledVersion: string; ReturnCode: Integer; VersionMS, VersionLS: Cardinal; - OverwriteInstall: Integer; + UninstallOld: Integer; begin Result := GetVersionNumbers(AddBackslash(ExpandConstant('{sys}')) + 'avisynth.dll', VersionMS , VersionLS); if Result then @@ -123,15 +123,10 @@ begin if RegQueryStringValue(HKLM, 'SOFTWARE\Aegisub\info', 'InstallDir', InstallDir) and RegQueryStringValue(HKLM, 'SOFTWARE\Aegisub\info', 'InstVer', InstalledVersion) and FileExists(AddBackslash(InstallDir) + 'uninstall.exe') then begin - OverwriteInstall := MsgBox('A previous Aegisub install has been detected (Version ' + InstalledVersion + ').'#13#10'Due to changes from the old installer you are strongly encouraged to uninstall it first.'#13#10'Uninstall it before proceeding?', mbConfirmation, MB_YESNOCANCEL); - if OverwriteInstall = IDCANCEL then - begin - Result := False; - Exit; - end - else if OverwriteInstall = IDNO then - Exit - else if OverwriteInstall = IDYES then + UninstallOld := MsgBox('A previous Aegisub install has been detected (Version ' + InstalledVersion + ').'#13#10'Due to changes from the old installer you are strongly encouraged to uninstall it first.'#13#10'Uninstall it before proceeding?', mbConfirmation, MB_YESNOCANCEL); + if UninstallOld = IDCANCEL then + Result := False + else if UninstallOld = IDYES then if FileCopy(AddBackslash(InstallDir) + 'uninstall.exe', AddBackslash(ExpandConstant('{tmp}')) + 'aegisub-uninstall.exe', False) then begin Exec(AddBackslash(ExpandConstant('{tmp}')) + 'aegisub-uninstall.exe', '_?=' + InstallDir, InstallDir, SW_SHOW, ewWaitUntilTerminated, ReturnCode);