From e688eb943ca9477cf8e134dbf9a0dbd0f3a83247 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 8 Jun 2010 17:02:41 +0200 Subject: [PATCH] Installer: Unregister Git Cheetah on uninstall (fixes issue 440) Signed-off-by: Sebastian Schuberth --- share/WinGit/install.iss | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/share/WinGit/install.iss b/share/WinGit/install.iss index a6a096e9..8c0ae681 100644 --- a/share/WinGit/install.iss +++ b/share/WinGit/install.iss @@ -1270,9 +1270,17 @@ begin DeleteContextMenuEntries; FileName:=AppDir+'\git-cheetah\git_shell_ext.dll'; - if FileExists(FileName) and (not DeleteFile(FileName)) then begin - Msg:='Line {#emit __LINE__}: Unable to delete file "'+FileName+'". Please delete it manually after logging off and on again.'; - MsgBox(Msg,mbError,MB_OK); - Log(Msg); + if FileExists(FileName) then begin + if not UnregisterServer(Is64BitInstallMode,FileName,False) then begin + Msg:='Line {#emit __LINE__}: Unable to unregister file "'+FileName+'". Please do it manually by running "regsvr32 /u '+ExtractFileName(FileName)+'".'; + MsgBox(Msg,mbError,MB_OK); + Log(Msg); + end; + + if not DeleteFile(FileName) then begin + Msg:='Line {#emit __LINE__}: Unable to delete file "'+FileName+'". Please do it manually after logging off and on again.'; + MsgBox(Msg,mbError,MB_OK); + Log(Msg); + end; end; end; -- 2.11.4.GIT