NSIS: shut down binary before uninstall

This commit is contained in:
Daniel Molkentin 2012-09-27 10:37:15 +02:00
Родитель d9d0432187
Коммит af99be4cd5
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -498,6 +498,10 @@ Function un.UnPageUserAppDataLeave
${NSD_GetState} $UnPageUserAppDataCheckbox $UnPageUserAppDataCheckbox_State
FunctionEnd
Function un.EnsureOwncloudShutdown
!insertmacro CheckAndConfirmEndProcess "${APPLICATION_EXECUTABLE}"
FunctionEnd
Section Uninstall
IfFileExists "$INSTDIR\${APPLICATION_EXECUTABLE}" owncloud_installed
MessageBox MB_YESNO "It does not appear that ${APPLICATION_NAME} is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" IDYES owncloud_installed
@ -649,6 +653,9 @@ Function un.onInit
StrCmp $R0 0 +3
MessageBox MB_OK|MB_ICONEXCLAMATION "This uninstaller is already running."
Abort
;Shutdown ${APPLICATION_NAME} in order to remove locked files.
Call un.EnsureOwncloudShutdown
FunctionEnd
Function un.onUnInstSuccess