Skip to content

Commit 1a87461

Browse files
authored
docs: update windows service uninstall guide (#261)
1 parent b83a98c commit 1a87461

2 files changed

Lines changed: 128 additions & 83 deletions

File tree

Lines changed: 64 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,95 @@
11
# Install as a Windows Service
22

3-
> Thanks to BeiChen℃ for providing the tutorial, and dawn-lc for providing the one-click install/uninstall script
3+
After EasyTier is installed as a Windows service, it can run in the background and start automatically with the system. This is useful for long-running or unattended deployments.
44

5-
On Windows systems, installing certain applications as services allows them to run automatically in the background without manual intervention, greatly improving the stability and convenience of the application.
5+
The recommended approach is to use the official `install.cmd` script for installation, updates, and removal. You no longer need to prepare NSSM manually.
66

7-
This tutorial will use NSSM (Non-Sucking Service Manager) to install the EasyTier application as a Windows service as an example, and provide a detailed explanation of the entire operation process.
7+
> Thanks to BeiChen℃ for the original tutorial and dawn-lc for the one-click install/uninstall script.
88
9-
## 1. Preparation
9+
## Quick Start
1010

11-
**Download EasyTier Application**:
11+
Open PowerShell in the directory where you want to install EasyTier and run:
1212

13-
Download the latest version of the `Windows` operating system `command line program` compressed package.
13+
```PowerShell
14+
iwr "https://raw.githubusercontent.com/EasyTier/EasyTier/main/script/install.cmd" -OutFile "install.cmd"; .\install.cmd
15+
```
1416

15-
After downloading, extract the compressed package to a local directory, such as `D:\EasyTier`.
17+
If GitHub is not accessible, use the mirror proxy command instead:
1618

17-
The current directory should contain at least the following files:
19+
```PowerShell
20+
iwr "https://ghfast.top/https://raw.githubusercontent.com/EasyTier/EasyTier/main/script/install.cmd" -OutFile "install.cmd"; .\install.cmd -ughp
21+
```
1822

19-
- `easytier-core.exe` (core program)
20-
- `easytier-cli.exe` (command line tool)
21-
- `Packet.dll` (runtime library)
22-
- `wintun.dll` (runtime library)
23+
The script will guide you through the setup and start the service automatically after installation succeeds.
2324

24-
**Download NSSM**:
25+
## Installation Steps
2526

26-
Open your browser and visit the NSSM official website [https://nssm.cc/](https://nssm.cc/download).
27+
1. Open PowerShell in the directory where you want to install EasyTier.
28+
2. Run the install script:
2729

28-
On the official website page, find the version suitable for your system (usually the latest version), click the download link to download it locally.
30+
```PowerShell
31+
.\install.cmd
32+
```
2933

30-
After downloading, find the version corresponding to your device architecture (such as: `win64`), and extract the `nssm.exe` from it to the local directory where `EasyTier` is located.
34+
3. Choose a configuration mode and provide the required values when prompted.
35+
4. After the script finishes, the Windows service is created and started automatically.
3136

32-
**Download Install/Uninstall Script**:
37+
## Configuration Modes
3338

34-
Start PowerShell in the current directory and execute the following commands:
39+
- `File`: use a local configuration file. Best when you already have a config file prepared.
40+
- `Remote`: use centralized management from a remote server. Best for managing multiple devices.
41+
- `CLI`: pass parameters directly on the command line. Best for quick testing or custom startup arguments.
3542

36-
`iwr "https://github.com/EasyTier/EasyTier/raw/refs/heads/main/script/install.cmd" -OutFile "install.cmd"`
43+
## Common Commands
3744

38-
`iwr "https://github.com/EasyTier/EasyTier/raw/refs/heads/main/script/uninstall.cmd" -OutFile "uninstall.cmd"`
45+
- Install the service:
3946

40-
## 2. Preparation Work
47+
```PowerShell
48+
.\install.cmd
49+
```
4150

42-
1. Ensure the current directory contains the following files:
51+
- Uninstall the service:
4352

44-
- `easytier-core.exe` (core program)
45-
- `easytier-cli.exe` (command line tool)
46-
- `nssm.exe` (service management tool)
47-
- `Packet.dll` (runtime library)
48-
- `wintun.dll` (runtime library)
49-
- `install.cmd` (install script)
50-
- `uninstall.cmd` (uninstall script)
53+
```PowerShell
54+
.\install.cmd -Uninstall
55+
```
5156

52-
2. Place the entire folder in a fixed location.
57+
- Update EasyTier:
5358

54-
## 3. Install Service
59+
```PowerShell
60+
.\install.cmd -Update
61+
```
5562

56-
1. Run `install.cmd`
57-
2. Follow the prompts to enter configuration information.
58-
3. After installation is complete, the service will start automatically.
63+
## Parameter Reference
5964

60-
## 4. Uninstall Service
65+
### Basic
6166

62-
1. Run `uninstall.cmd`
63-
2. The script will automatically stop and delete the service.
67+
- `-H` / `-?` / `-Help`: show help information and exit.
6468

65-
## 5. Notes
69+
### Service Actions
6670

67-
1. Do not move the program file location after installation
71+
- `-U` / `-Update`: update EasyTier to the latest version.
72+
- `-X` / `-Uninstall`: uninstall the EasyTier service.
6873

69-
## 6. Common Questions
74+
### Download Proxies
7075

71-
**Q: How to modify service configuration?**
76+
- `-UGHP` / `-UseGitHubProxy`: download through a GitHub mirror proxy. Default: `$false`.
77+
- `-GHP` / `-GitHubProxy <proxy>`: specify the GitHub mirror proxy address. Default: `https://ghfast.top/`.
78+
- `-UP` / `-UseProxy`: use a custom proxy. Default: `$false`.
79+
- `-P` / `-Proxy <proxy>`: specify the custom proxy address. Default: `http://127.0.0.1:7890`.
7280

73-
A: First uninstall the service, then reinstall it
81+
### Configuration and Service Name
82+
83+
- `-C` / `-ConfigType <type>`: set the configuration mode. Supported values: `File`, `Remote`, `CLI`.
84+
- `-N` / `-ServiceName <name>`: set the installed service name. Default: `EasyTierService`.
85+
- `<other arguments...>`: when `CLI` mode is used, any remaining arguments are passed to EasyTier.
86+
87+
## FAQ
88+
89+
**Q: How do I change the service configuration?**
90+
91+
A: First run `.\install.cmd -Uninstall`, then install the service again with the new configuration.
92+
93+
**Q: Why should I keep the directory in the same place after installation?**
94+
95+
A: The Windows service stores the paths to the EasyTier executables and script. If the directory moves, the service may fail to start.
Lines changed: 64 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,95 @@
11
# 安装为 Windows 服务
22

3-
> 感谢 北辰℃ 提供的教程,以及由 dawn-lc 提供的一键安装/卸载脚本
3+
将 EasyTier 安装为 Windows 服务后,它可以在后台自动运行,并支持随系统启动,适合长期在线或无人值守的场景。
44

5-
在 Windows 系统中,将某些应用程序安装为服务可以使其在后台自动运行,无需用户手动干预,极大地提高了应用的运行稳定性和便捷性
5+
当前推荐直接使用官方 `install.cmd` 脚本完成安装、更新和卸载,无需再手动准备 NSSM
66

7-
本教程将以使用 NSSM(Non-Sucking Service Manager)工具将 EasyTier 应用安装为 Windows 服务为例,详细介绍整个操作流程
7+
> 感谢 北辰℃ 提供的教程,以及 dawn-lc 提供的一键安装/卸载脚本
88
9-
## 一、前期准备
9+
## 快速开始
1010

11-
**下载 EasyTier 应用**
11+
推荐直接在希望安装 EasyTier 的目录中打开 PowerShell,然后执行
1212

13-
下载最新版本的 `Windows` 操作系统的 `命令行程序` 压缩包。
13+
```PowerShell
14+
iwr "https://raw.githubusercontent.com/EasyTier/EasyTier/main/script/install.cmd" -OutFile "install.cmd"; .\install.cmd
15+
```
1416

15-
下载完成后,将该压缩包解压到本地目录,比如`D:\EasyTier`
17+
如果无法访问 GitHub,可以使用镜像代理:
1618

17-
当前目录下应至少包含以下文件:
18-
- `easytier-core.exe` (核心程序)
19-
- `easytier-cli.exe` (命令行工具)
20-
- `Packet.dll` (运行库)
21-
- `wintun.dll` (运行库)
19+
```PowerShell
20+
iwr "https://ghfast.top/https://raw.githubusercontent.com/EasyTier/EasyTier/main/script/install.cmd" -OutFile "install.cmd"; .\install.cmd -ughp
21+
```
2222

23-
**下载 NSSM**
23+
脚本会根据提示完成配置,并在安装成功后自动启动服务。
2424

25-
打开浏览器,访问 NSSM 官网 [https://nssm.cc/](https://nssm.cc/download)
25+
## 安装流程
2626

27-
在官网页面中找到适用于你系统的版本(通常是最新版本),点击下载链接将其下载到本地。
27+
1. 在希望安装 EasyTier 的目录中打开 PowerShell。
28+
2. 运行安装脚本:
2829

29-
下载完成后,找到对应您设备架构的版本(如:`win64`),将其中的`nssm.exe`解压到`EasyTier`所在的本地目录。
30+
```PowerShell
31+
.\install.cmd
32+
```
3033

34+
3. 根据提示选择配置模式,并填写所需参数。
35+
4. 安装完成后,脚本会自动创建并启动 Windows 服务。
3136

32-
**下载 安装/卸载 脚本**
37+
## 配置模式说明
3338

34-
在当前目录下启动PowerShell并执行以下命令:
39+
- `File`:使用本地配置文件,适合已经准备好配置文件的场景。
40+
- `Remote`:使用远程服务器集中管理,适合统一维护多台设备。
41+
- `CLI`:直接通过命令行传参启动,适合临时调试或自定义参数较多的场景。
3542

36-
`iwr "https://github.com/EasyTier/EasyTier/raw/refs/heads/main/script/install.cmd" -OutFile "install.cmd"`
43+
## 常用命令
3744

38-
`iwr "https://github.com/EasyTier/EasyTier/raw/refs/heads/main/script/uninstall.cmd" -OutFile "uninstall.cmd"`
45+
- 安装服务:
3946

40-
## 二、准备工作
47+
```PowerShell
48+
.\install.cmd
49+
```
4150

42-
1. 确保当前目录下包含以下文件:
43-
- `easytier-core.exe` (核心程序)
44-
- `easytier-cli.exe` (命令行工具)
45-
- `nssm.exe` (服务管理工具)
46-
- `Packet.dll` (运行库)
47-
- `wintun.dll` (运行库)
48-
- `install.cmd` (安装脚本)
49-
- `uninstall.cmd` (卸载脚本)
51+
- 卸载服务:
5052

51-
2. 将整个文件夹放在固定位置。
53+
```PowerShell
54+
.\install.cmd -Uninstall
55+
```
5256

53-
## 三、安装服务
57+
- 更新 EasyTier:
5458

55-
1. 运行`install.cmd`
56-
2. 按照提示输入配置信息。
57-
4. 安装完成后会自动启动服务。
59+
```PowerShell
60+
.\install.cmd -Update
61+
```
5862

59-
## 四、卸载服务
63+
## 参数参考
6064

61-
1. 运行`uninstall.cmd`
62-
2. 脚本会自动停止并删除服务。
65+
### 基础参数
6366

64-
## 五、注意事项
67+
- `-H` / `-?` / `-Help`:显示帮助信息并退出。
6568

66-
1. 安装后不要移动程序文件位置
69+
### 服务操作
6770

68-
## 六、常见问题
71+
- `-U` / `-Update`:更新 EasyTier 到最新版本。
72+
- `-X` / `-Uninstall`:卸载 EasyTier 服务。
73+
74+
### 下载代理
75+
76+
- `-UGHP` / `-UseGitHubProxy`:使用 GitHub 镜像代理下载,默认值为 `$false`
77+
- `-GHP` / `-GitHubProxy <代理地址>`:指定 GitHub 镜像代理地址,默认值为 `https://ghfast.top/`
78+
- `-UP` / `-UseProxy`:使用自定义代理,默认值为 `$false`
79+
- `-P` / `-Proxy <代理地址>`:指定自定义代理地址,默认值为 `http://127.0.0.1:7890`
80+
81+
### 配置与服务名
82+
83+
- `-C` / `-ConfigType <类型>`:指定配置模式,可选值为 `File``Remote``CLI`
84+
- `-N` / `-ServiceName <名称>`:指定安装后的服务名,默认值为 `EasyTierService`
85+
- `<其他参数...>`:当使用 `CLI` 模式时,会作为额外参数传递给 EasyTier。
86+
87+
## 常见问题
6988

7089
**Q: 如何修改服务配置?**
7190

72-
A: 先卸载服务,然后重新安装
91+
A: 先执行 `.\install.cmd -Uninstall` 卸载服务,再使用新的配置重新安装。
92+
93+
**Q: 为什么安装后不能移动目录?**
94+
95+
A: Windows 服务会记录 EasyTier 可执行文件和脚本所在路径,移动目录后服务可能无法正常启动。

0 commit comments

Comments
 (0)