Handle app running
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7261 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
62b5ca2dba
commit
2a0db8b42e
2 changed files with 28 additions and 9 deletions
|
@ -24,12 +24,14 @@ InstallDirRegKey HKLM "${REGPATH_UNINSTSUBKEY}" "UninstallString"
|
|||
!include LogicLib.nsh
|
||||
!include Integration.nsh
|
||||
|
||||
|
||||
Page Directory
|
||||
Page InstFiles
|
||||
|
||||
Uninstpage UninstConfirm
|
||||
Uninstpage InstFiles
|
||||
|
||||
|
||||
!macro EnsureAdminRights
|
||||
UserInfo::GetAccountType
|
||||
Pop $0
|
||||
|
@ -74,12 +76,20 @@ Section "Start Menu shortcut"
|
|||
SectionEnd
|
||||
|
||||
|
||||
Section -Uninstall
|
||||
${UnpinShortcut} "$SMPrograms\${NAME}.lnk"
|
||||
Delete "$SMPrograms\${NAME}.lnk"
|
||||
!macro DeleteFileOrAskAbort path
|
||||
ClearErrors
|
||||
Delete "${path}"
|
||||
IfErrors 0 +3
|
||||
MessageBox MB_ABORTRETRYIGNORE|MB_ICONSTOP 'Unable to delete "${path}"!' IDRETRY -3 IDIGNORE +2
|
||||
Abort "Aborted"
|
||||
!macroend
|
||||
|
||||
Delete "$InstDir\MyApp.exe"
|
||||
Section -Uninstall
|
||||
!insertmacro DeleteFileOrAskAbort "$InstDir\MyApp.exe"
|
||||
Delete "$InstDir\Uninst.exe"
|
||||
RMDir "$InstDir"
|
||||
DeleteRegKey HKLM "${REGPATH_UNINSTSUBKEY}"
|
||||
|
||||
${UnpinShortcut} "$SMPrograms\${NAME}.lnk"
|
||||
Delete "$SMPrograms\${NAME}.lnk"
|
||||
SectionEnd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue