with my server it goes c:\server\server-data\ to get to resources etc and just c:\server for all the base files
but I keep getting “cannot find specified path”
@echo off
RMDIR /s /q "C:\RGN\server-data\cache\files"
echo ----------------------------------
echo -
echo To restart the server, Press CTRL + C then "runserver"
echo -
echo ----------------------------------
echo -
echo Press any key to launch the server.
echo -
pause > nul
CLS
:: CONFIGURATION
TITLE GTA 5 FIVEM SERVER
set reboot=6
set reboot2=12
set reboot3=18
set reboot4=0
set reboot_done=0
set reboot_done2=0
set reboot_done3=0
set reboot_done4=0
set location=C:\RGN\
:: CONFIGURATION
:start
set dat=%date:~6,4%-%date:~3,2%-%date:~0,2%
set backup=%location%logs\%dat%.txt
:: Partie sauvegarde
echo [%time%] - Open server
echo [%time%] - Open server >> %backup%
echo [%time%] - Launching the backup
echo [%time%] - Launching the backup >> %backup%
xcopy %location%\server-data\"resources" %location%\backups\"%dat%" /E /H /R /Y /I /D >> %backup%
echo [%time%] - Backup ends
echo [%time%] - Backup ends >> %backup%
:: Partie sauvegarde
:: Partie lancement
start %location%run.cmd +exec server.cfg %*
:: Partie lancement
goto loop
:loop
timeout /t 30>null
set tps=%TIME:~-0,2%
if %tps% == %reboot% (
if %reboot_done% == 0 (
echo [%time%] - We close the server for reboot && echo [%time%] - We close the server for reboot >> %backup%
taskkill /IM cmd.exe /FI "WINDOWTITLE ne GTA 5 FIVEM SERVER*" >> %backup%
echo ----------------------------------------------------------------------
set reboot_done=1
goto start
) else (
goto loop
)
) else (
set reboot_done=0
goto loop
)
:: Partie lancement 2
goto loop
:loop
timeout /t 30>null
set tps2=%TIME:~-0,2%
if %tps2% == %reboot2% (
if %reboot_done2% == 0 (
echo [%time%] - We close the server for reboot && echo [%time%] - We close the server for reboot >> %backup%
taskkill /IM cmd.exe /FI "WINDOWTITLE ne GTA 5 FIVEM SERVER*" >> %backup%
echo ----------------------------------------------------------------------
set reboot_done2=1
goto start
) else (
goto loop
)
) else (
set reboot_done2=0
goto loop
)
:: Partie lancement 3
goto loop
:loop
timeout /t 30>null
set tps3=%TIME:~-0,2%
if %tps3% == %reboot3% (
if %reboot_done3% == 0 (
echo [%time%] - We close the server for reboot && echo [%time%] - We close the server for reboot >> %backup%
taskkill /IM cmd.exe /FI "WINDOWTITLE ne GTA 5 FIVEM SERVER*" >> %backup%
echo ----------------------------------------------------------------------
set reboot_done3=1
goto start
) else (
goto loop
)
) else (
set reboot_done3=0
goto loop
)
:: Partie lancement 4
goto loop
:loop
timeout /t 30>null
set tps4=%TIME:~-0,2%
if %tps4% == %reboot4% (
if %reboot_done4% == 0 (
echo [%time%] - We close the server for reboot && echo [%time%] - We close the server for reboot >> %backup%
taskkill /IM cmd.exe /FI "WINDOWTITLE ne GTA 5 FIVEM SERVER*" >> %backup%
echo ----------------------------------------------------------------------
set reboot_done4=1
goto start
) else (
goto loop
)
) else (
set reboot_done4=0
goto loop
)
it run as admin so it gives me this error that i am missing the master key but if run normal its fine it works if i do it manualy but the program cant get it started since it starts it with admin privaleges and i cant find where i can turn that off