summaryrefslogtreecommitdiffhomepage
path: root/res/windows_bats/service_install.bat
blob: 6158bae95e6c7c0c64565962f1929584ce0fce13 (plain)
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
@REM SPDX-FileCopyrightText: 2026 Dilluti0n <[email protected]>
@REM SPDX-License-Identifier: GPL-3.0-or-later

@echo Please run this script with administrator privileges.
@echo Right click, select "Run as administrator".
@echo.
@echo Press any key if you are running this as administrator.
@pause

@rem Add --fake-autottl below (next to ARGS=) to use fake
@set "ARGS=-D"
@set "EXE=%~dp0dpibreak.exe"
@set "SERVNAME=dpibreak"

sc stop %SERVNAME%
sc delete %SERVNAME%
sc create %SERVNAME% binPath= "\"%EXE%\" %ARGS%" start= auto
sc description %SERVNAME% "Fast and easy-to-use DPI circumvention tool in Rust."
sc start %SERVNAME%
@if %ERRORLEVEL% equ 0 (
    @echo.
    @echo Installation complete. %SERVNAME% is running and will start automatically on boot.
    @echo To stop and uninstall the service, run service_remove.bat.
) else (
    @echo.
    @echo Installation failed. Make sure to run this script as administrator.
)
@pause