diff --git a/app/win/installer/installer.nsi b/app/win/installer/installer.nsi index 5e1154c39c..8669dba6b3 100755 --- a/app/win/installer/installer.nsi +++ b/app/win/installer/installer.nsi @@ -218,37 +218,26 @@ Function UninstallOld ${GetFileName} $3 $4 StrCpy $5 $4 6 StrCmp $5 "Zotero" +1 continue_installation - RMDir /r /REBOOTOK "$3\chrome" - RMDir /r /REBOOTOK "$3\components" - RMDir /r /REBOOTOK "$3\defaults" - RMDir /r /REBOOTOK "$3\dictionaries" - RMDir /r /REBOOTOK "$3\extensions" - RMDir /r /REBOOTOK "$3\fonts" - RMDir /r /REBOOTOK "$3\gmp-clearkey" - RMDir /r /REBOOTOK "$3\uninstall" - RMDir /r /REBOOTOK "$3\xulrunner" - Delete /REBOOTOK "$3\*.chk" - Delete /REBOOTOK "$3\*.dll" - Delete /REBOOTOK "$3\*.exe" - Delete /REBOOTOK "$3\Accessible.tlb" - Delete /REBOOTOK "$3\dependentlibs.list" - Delete /REBOOTOK "$3\firefox.VisualElementsManifest.xml" - Delete /REBOOTOK "$3\omni.ja" - Delete /REBOOTOK "$3\platform.ini" - Delete /REBOOTOK "$3\precomplete" - Delete /REBOOTOK "$3\voucher.bin" - RMDir /REBOOTOK $3 - - ${If} ${FileExists} "$3" - # If the directory still exists, check if current user is Admin. - # For Admin users, /REBOOTOK works and directory will be removed after reboot - # For non-Admin users, we display a message and quit - UserInfo::GetAccountType - pop $0 - StrCmp $0 "Admin" continue_installation - MessageBox mb_iconstop "The previous installation of Zotero could not be removed. Please manually delete the following folder, and then run the installer again: $\n$\n$3" - Quit - ${EndIf} + RMDir /r "$3\chrome" + RMDir /r "$3\components" + RMDir /r "$3\defaults" + RMDir /r "$3\dictionaries" + RMDir /r "$3\extensions" + RMDir /r "$3\fonts" + RMDir /r "$3\gmp-clearkey" + RMDir /r "$3\uninstall" + RMDir /r "$3\xulrunner" + Delete "$3\*.chk" + Delete "$3\*.dll" + Delete "$3\*.exe" + Delete "$3\Accessible.tlb" + Delete "$3\dependentlibs.list" + Delete "$3\firefox.VisualElementsManifest.xml" + Delete "$3\omni.ja" + Delete "$3\platform.ini" + Delete "$3\precomplete" + Delete "$3\voucher.bin" + RMDir $3 continue_installation: ; End uninstallation