fix windows add-firewall-rule script

This commit is contained in:
ReenigneArcher 2022-08-28 15:51:17 -04:00
parent 43fa4100d2
commit f7d4f49809
No known key found for this signature in database
GPG Key ID: 0CA6A47B0630EA9B
2 changed files with 10 additions and 3 deletions

View File

@ -1,7 +1,14 @@
@echo off
rem Get sunshine root directory
for %%I in ("%~dp0\..") do set "ROOT_DIR=%%~fI"
set RULE_NAME=Sunshine
set PROGRAM_BIN="%~dp0sunshine.exe"
set PROGRAM_BIN="%ROOT_DIR%\sunshine.exe"
echo %PROGRAM_BIN%
pause
rem Add the rule
netsh advfirewall firewall add rule name=%RULE_NAME% dir=in action=allow protocol=tcp program=%PROGRAM_BIN% enable=yes

View File

@ -1,10 +1,10 @@
@echo off
rem Get sunshine root directory
for %%I in ("%~dp0\..") do set "root_dir=%%~fI"
for %%I in ("%~dp0\..") do set "ROOT_DIR=%%~fI"
set SERVICE_NAME=sunshinesvc
set SERVICE_BIN="%root_dir%\tools\sunshinesvc.exe"
set SERVICE_BIN="%ROOT_DIR%\tools\sunshinesvc.exe"
set SERVICE_START_TYPE=auto
rem Check if sunshinesvc already exists