aboutsummaryrefslogtreecommitdiffhomepage
path: root/ui/setup/service/run.cmd
diff options
context:
space:
mode:
Diffstat (limited to 'ui/setup/service/run.cmd')
-rw-r--r--ui/setup/service/run.cmd23
1 files changed, 23 insertions, 0 deletions
diff --git a/ui/setup/service/run.cmd b/ui/setup/service/run.cmd
new file mode 100644
index 0000000..25ceabf
--- /dev/null
+++ b/ui/setup/service/run.cmd
@@ -0,0 +1,23 @@
+@echo off
+%~d0
+cd "%~dp0"
+set nssm="%cd%\nssm"
+cd ..
+
+%nssm% install %1 "%cd%\bin\%1.exe"
+
+%nssm% set %1 DisplayName %1
+%nssm% set %1 Description rustdesk %1 server
+%nssm% set %1 Start SERVICE_AUTO_START
+
+%nssm% set %1 ObjectName LocalSystem
+%nssm% set %1 Type SERVICE_WIN32_OWN_PROCESS
+
+%nssm% set %1 AppThrottle 1000
+%nssm% set %1 AppExit Default Restart
+%nssm% set %1 AppRestartDelay 0
+
+%nssm% set %1 AppStdout "%cd%\logs\%1.out"
+%nssm% set %1 AppStderr "%cd%\logs\%1.err"
+
+%nssm% start %1 \ No newline at end of file