DetailPrint "Failed to stop nssm-style helper, maybe it was not there"
; let's try to stop it in case it's the new style helper
; let's try to stop it in case it's the new style helper -- we need to do it to be able to overwrite it.
; we don't care about errors because if we're upgrading from 0.20.1 this will not work.
ClearErrors
DetailPrint "Trying to uninstall a new style helper..."
ExecWait '"$INSTDIR\bitmask_helper.exe" stop'
IfErrors 0 noErrorHelper
; Error handling - ok, we give up
MessageBox MB_OK|MB_ICONEXCLAMATION "$applicationNameLower-helper cannot be deleted. Please try to remove it manually, and then run this installer again."
Abort
DetailPrint "Failed to stop new-style helper, maybe it was not there"
noErrorHelper:
; now we try to delete the systray, locked by the app - just to know if another instance of FoobarVPN is running.