From 4730dea2d42c038e9937d0bd6bbb704d324c5d0b Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Thu, 18 Oct 2007 12:04:00 +0200 Subject: [PATCH] WinGit(Inno): Quit uninstaller when ssh-agent is running If ssh-agent is running in the background, uninstall would not be able to remove it, leaving files and directories on disk after uninstall. This is fixed by issuing a warning before uninstall starts if ssh-agent.exe cannot be deleted, asking the user to stop all ssh-agent processes and run uninstall again. [sp: adjusted ReleaseNotes.txt ] Signed-off-by: Sebastian Schuberth Signed-off-by: Steffen Prohaska --- share/WinGit/ReleaseNotes.txt | 5 ----- share/WinGit/install.iss | 12 ++++++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/share/WinGit/ReleaseNotes.txt b/share/WinGit/ReleaseNotes.txt index 513c5761..4668b4eb 100644 --- a/share/WinGit/ReleaseNotes.txt +++ b/share/WinGit/ReleaseNotes.txt @@ -17,11 +17,6 @@ Look for files starting with RelNotes. Known issues ------------ - * If ssh-agent is running uninstall fails to remove all - files and reinstalling fails because it cannot write to - ssh-agent.exe. Killing all ssh-agent processes solves - the issue. - * pull/fetch in git-gui fails. Use Git Bash to avoid the problem. diff --git a/share/WinGit/install.iss b/share/WinGit/install.iss index e1a67d83..69211f2e 100644 --- a/share/WinGit/install.iss +++ b/share/WinGit/install.iss @@ -340,6 +340,18 @@ begin SetEnvStrings('PATH',True,True,EnvPath); end; +{ + Uninstaller code +} + +function InitializeUninstall:Boolean; +begin + Result:=DeleteFile(ExpandConstant('{app}')+'\bin\ssh-agent.exe'); + if not Result then begin + MsgBox('Please stop all ssh-agent processes and run uninstall again.',mbError,MB_OK); + end; +end; + procedure CurUninstallStepChanged(CurUninstallStep:TUninstallStep); var AppDir:string; -- 2.11.4.GIT