You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"if I click Uninstall while App is running, nothing happens...I assume exception is swallowed silently? Should we also prompt like install "Click OK to close running app..."
MessageBoxMB_OKCANCEL|MB_ICONEXCLAMATION"${PRODUCT_NAME} is running. $\r$\nClick OK to close it and continue with ${MODE}." /SD IDCANCELIDOK doStopProcess
28
+
MessageBoxMB_OKCANCEL|MB_ICONEXCLAMATION"${PRODUCT_NAME} is running. $\r$\nClick OK to close it and continue with ${MODE}." /SD IDOKIDOK doStopProcess
Copy file name to clipboardExpand all lines: templates/nsis/installer.nsi
+25-20Lines changed: 25 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -48,25 +48,6 @@ Function .onInit
48
48
!endif
49
49
FunctionEnd
50
50
51
-
Function un.onInit
52
-
!insertmacro check64BitAndSetRegView
53
-
54
-
${IfNot}${Silent}
55
-
MessageBoxMB_OKCANCEL"Are you sure you want to uninstall ${PRODUCT_NAME}?"IDOK +2
56
-
Quit
57
-
58
-
!ifdef ONE_CLICK
59
-
SetSilentsilent
60
-
!endif
61
-
${EndIf}
62
-
63
-
!insertmacro initMultiUser Un un.
64
-
65
-
!ifmacrodef customUnInit
66
-
!insertmacro customUnInit
67
-
!endif
68
-
FunctionEnd
69
-
70
51
Section"install"
71
52
${IfNot}${Silent}
72
53
SetDetailsPrintnone
@@ -127,10 +108,34 @@ Section "install"
127
108
${EndIf}
128
109
SectionEnd
129
110
111
+
Function un.onInit
112
+
!insertmacro check64BitAndSetRegView
113
+
114
+
${IfNot}${Silent}
115
+
MessageBoxMB_OKCANCEL"Are you sure you want to uninstall ${PRODUCT_NAME}?"IDOK +2
116
+
Quit
117
+
118
+
!ifdef ONE_CLICK
119
+
# one-click installer executes uninstall section in the silent mode, but we must show message dialog if silent mode was not explicitly set by user (using /S flag)
120
+
!insertmacro CHECK_APP_RUNNING "uninstall"
121
+
SetSilentsilent
122
+
!endif
123
+
${EndIf}
124
+
125
+
!insertmacro initMultiUser Un un.
126
+
127
+
!ifmacrodef customUnInit
128
+
!insertmacro customUnInit
129
+
!endif
130
+
FunctionEnd
131
+
130
132
Section"un.install"
131
133
SetAutoClosetrue
132
134
133
-
!insertmacro CHECK_APP_RUNNING "uninstall"
135
+
!ifndef ONE_CLICK
136
+
# for boring installer we check it here to show progress
0 commit comments