Is it possible in whatever code I put in the "onAppUninstall" event, to cancel the uninstall command?
The scenario is that I'd like a message box to appear, "Are you sure you want to uninstall this? It is still running in the background and will kill whatever it's doing" or something like that. If the user clicks 'no', it should stop the uninstall.
Bryan
Oh nevermind. I realized that if I returned 'false', it cancels it, like this
onAppUninstall:=Function(v)
If MessageBox.Show("Are you sure you want to uninstall? ", "APP", MessageBoxButtons.YesNo, MessageBoxIcon.Stop, MessageBoxDefaultButton.Button2) = DialogResult.No Then
Return False
Exit Function
End If
'do stuff
Return True
Um, this isn't true. It will uninstall regardless of what you return. You cannot cancel uninstall.
Oh, you're right. I just did some further testing when the process wasn't running.
Cancelling uninstalls (to prevent accidents or user stupidity) would be a nice feature to add.
Bryan
I don't think we're going to let programmers override what the user wants, sorry
Being able to cancel the uninstall would be quite useful in case the user uninstalls by accident. A simple confirm dialog "Are you Sure?". Also, we would like to ask the user if they want to also delete their settings. Without this feature, we will probably have to build an uninstall menu command into the application which is not ideal.
Most helpful comment
Being able to cancel the uninstall would be quite useful in case the user uninstalls by accident. A simple confirm dialog "Are you Sure?". Also, we would like to ask the user if they want to also delete their settings. Without this feature, we will probably have to build an uninstall menu command into the application which is not ideal.