diff --git a/win/template.nsi b/win/template.nsi
index 567e5840fb94c1a9b37ecdbea073922c568a46da..ae860b64b79fee9a876bc0a0570d3223bef98519 100755
--- a/win/template.nsi
+++ b/win/template.nsi
@@ -29,6 +29,7 @@ RequestExecutionLevel admin
 !macroend
 
 
+
 !define BITMAP_FILE riseupvpn.bmp
 
 !define MUI_ICON "..\assets\$app_name_lower.ico"
@@ -45,6 +46,16 @@ RequestExecutionLevel admin
  
 
 Section "InstallFiles"
+  ; first we try to delete the systray, locked by the app.
+  ClearErrors
+  Delete 'C:\Program Files\$app_name\bitmask-systray.exe'
+  IfErrors 0 noError
+
+  ; Error handling
+  MessageBox MB_OK|MB_ICONEXCLAMATION "$app_name is Running. Please close it, and then run this installer again."
+  Abort
+
+  noError:
   ExecShellWait "runas" "$INSTDIR\nssm.exe" 'stop $app_name_lower-helper'
   ExecShellWait "runas" "$INSTDIR\nssm.exe" 'remove $app_name_lower-helper confirm'