Skip to content

Commit 81e9d17

Browse files
authored
Make sure firewall rules are reapplied during an update. (#58)
1 parent 334ec38 commit 81e9d17

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

windows/web/slimevr_web_installer.nsi

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,12 +640,13 @@ SectionGroupEnd
640640

641641
Section "-" SEC_FIREWALL
642642
${If} $SELECTED_INSTALLER_ACTION == "repair"
643+
${OrIf} $SELECTED_INSTALLER_ACTION == "update"
643644
DetailPrint "Removing SlimeVR Server from firewall exceptions...."
644-
nsExec::Exec '"$INSTDIR\firewall_uninstall.bat"'
645+
nsExec::ExecToLog '"$INSTDIR\firewall_uninstall.bat"'
645646
${Endif}
646647

647648
DetailPrint "Adding SlimeVR Server to firewall exceptions...."
648-
nsExec::Exec '"$INSTDIR\firewall.bat"'
649+
nsExec::ExecToLog '"$INSTDIR\firewall.bat"'
649650
SectionEnd
650651

651652
Section "-" SEC_REGISTERAPP
@@ -686,7 +687,7 @@ SectionEnd
686687
Function componentsPre
687688
Call JREdetect
688689
${If} $SELECTED_INSTALLER_ACTION == "update"
689-
SectionSetFlags ${SEC_FIREWALL} 0
690+
SectionSetFlags ${SEC_FIREWALL} ${SF_SELECTED}
690691
SectionSetFlags ${SEC_REGISTERAPP} 0
691692
SectionSetFlags ${SEC_WEBVIEW} ${SF_SELECTED}
692693
SectionSetFlags ${SEC_MSVCPP} ${SF_SELECTED}

0 commit comments

Comments
 (0)