NSIS 卸载时判断程序是否运行

Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "您确实要完全移除xxx,及其所有的组件?" IDYES +2
  Abort
Find:
FindProcDLL::FindProc "你的程序1.exe"
  StrCmp $R0 1 Running 
FindProcDLL::FindProc "你的程序2.exe"
  StrCmp $R0 1 Running 
FindProcDLL::FindProc "你的程序3.exe"
  StrCmp $R0 1 Running Uninst
Running:
  MessageBox MB_ICONQUESTION|MB_RETRYCANCEL|MB_DEFBUTTON1 "xxx正在运行,请先关闭程序,然后重试!" IDRETRY Find
  Abort
Uninst:
FunctionEnd
© 版权声明
THE END
喜欢就支持一下吧
点赞10 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容