-
Notifications
You must be signed in to change notification settings - Fork 6
/
SETUP_RUN_SERVER.bat
61 lines (51 loc) · 1.42 KB
/
SETUP_RUN_SERVER.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@echo off
CALL CD %~dp0
:CreateJob
echo It is recommended to run the server in your network.
CALL SET /P server=Would you like to run the server locally or in your network (L/N)?
IF NOT %server% == N (
IF NOT %server% == n (
IF NOT %server% == L (
IF NOT %server% == l (
Echo
Echo
GOTO CreateJob
Echo
Echo
)
)
)
)
echo It is recommended NOT to run with highest privileges unless it is necessary for the command to be executed.
CALL SET /P privileges=Would you like to run the server with highest privileges (Y/N)?
echo It is recommended NOT to run the application hidden. Only experienced users should run it hidden!
CALL SET /P hidden=Would you like to run the application hidden (Y/N)?
IF %server% == L (
CALL SET locally=true
) else (
IF %server% == l (
CALL SET locally=true
) else (
CALL SET locally=false
)
)
IF %privileges% == Y (
CALL SET level=HIGHEST
) else (
IF %privileges% == y (
CALL SET level=HIGHEST
) else (
CALL SET level=LIMITED
)
)
IF %hidden% == Y (
CALL SET python=pythonw.exe
) else (
IF %hidden% == y (
CALL SET python=pythonw.exe
) else (
CALL SET python=python.exe
)
)
CALL SCHTASKS /CREATE /SC DAILY /TN "AutomationOrchestratorRunServer" /TR "'%CD%\venv\scripts\%python%' '%CD%\automation_orchestrator\run_server.py' --locally=%locally%" /ST 00:00 /RI 1 /DU 23:59 /RL %level% /F
TIMEOUT 15