diff options
Diffstat (limited to 'branding/templates/windows/template.nsi')
-rwxr-xr-x | branding/templates/windows/template.nsi | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/branding/templates/windows/template.nsi b/branding/templates/windows/template.nsi index f6a908d..9c319d0 100755 --- a/branding/templates/windows/template.nsi +++ b/branding/templates/windows/template.nsi @@ -61,6 +61,11 @@ Section "InstallFiles" Delete 'C:\Program Files\$applicationName\bitmask_helper.exe' IfErrors 0 noErrorHelper + DetailPrint "Trying to uninstall new helper..." + ClearErrors + Delete 'C:\Program Files\$applicationName\helper.exe' + IfErrors 0 noErrorHelper + ; uninstalling old nssm helper - could fail if it isn't there, or if nssm is not there... ClearErrors DetailPrint "Trying to uninstall an old style helper..." @@ -77,6 +82,12 @@ Section "InstallFiles" IfErrors 0 noErrorHelper DetailPrint "Failed to stop new-style helper, maybe it was not there" + ClearErrors + DetailPrint "Trying to uninstall a new style helper..." + ExecWait '"$INSTDIR\helper.exe" stop' + IfErrors 0 noErrorHelper + 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. @@ -120,14 +131,14 @@ SectionEnd Section "InstallService" DetailPrint "Trying to uninstall previous versions of the (new) helper..." ClearErrors - ExecWait '"$INSTDIR\bitmask_helper.exe" stop' - ExecWait '"$INSTDIR\bitmask_helper.exe" remove' + ExecWait '"$INSTDIR\helper.exe" stop' + ExecWait '"$INSTDIR\helper.exe" remove' IfErrors 0 noError DetailPrint "Could not uninstall a previous version of the (new) helper!" noError: - ExecWait '"$INSTDIR\bitmask_helper.exe" install' - ExecWait '"$INSTDIR\bitmask_helper.exe" start' + ExecWait '"$INSTDIR\helper.exe" install' + ExecWait '"$INSTDIR\helper.exe" start' SectionEnd Section /o "TAP Virtual Ethernet Adapter" SecTAP @@ -147,9 +158,11 @@ Section "Uninstall" ExecWait '"$INSTDIR\bitmask_helper.exe" stop' ExecWait '"$INSTDIR\bitmask_helper.exe" remove' + ExecWait '"$INSTDIR\helper.exe" stop' + ExecWait '"$INSTDIR\helper.exe" remove' + ; now we (try to) remove everything else. kill it with fire! Delete $INSTDIR\nssm.exe ; probably does not exist anymore, but just in case - Delete $INSTDIR\bitmask_helper.exe Delete $INSTDIR\readme.txt Delete $INSTDIR\helper.log Delete $INSTDIR\openvpn.log |