Files
remote-volume-monitor/Releases/remote-volume-monitor-v1.0/快速开始.md
Agent 45e7d9553a Initial commit - 按新规范整理目录结构
- Code/: 源代码、配置文件、文档、工具
- Releases/: 发布包(v1.0)
- Test/: 测试用例和测试脚本
2026-03-20 06:54:40 +08:00

140 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 快速开始指南
## 3 分钟快速上手
### 步骤 1下载 nircmd1 分钟)
**64 位 Windows**
```
https://www.nirsoft.net/utils/nircmd-x64.zip
```
**32 位 Windows**
```
https://www.nirsoft.net/utils/nircmd.zip
```
下载后解压,将 `nircmd.exe` 放到 `tools\` 文件夹。
---
### 步骤 2测试程序1 分钟)
打开命令提示符,进入程序目录:
```bash
cd D:\Software\remote-volume-monitor-v1.0
# 测试运行
python src\remote_volume_monitor.py --test
```
**预期输出:**
```
✓ 音量控制器nircmd (.\tools\nircmd.exe)
✓ RDP 监控器初始化成功
音量控制器:✓ 就绪
```
---
### 步骤 3启动监控1 分钟)
**方式 1双击启动脚本**
```
双击 scripts\启动监控.bat
```
**方式 2命令行启动**
```bash
python src\remote_volume_monitor.py
```
**完成!** 程序已在后台运行。
---
## 测试功能
### 测试 RDP 连接
1. 确保程序正在运行
2. 用另一台电脑 RDP 连接到此电脑
3. 观察音量是否自动降低到 30%
4. 断开 RDP 连接
5. 观察音量是否自动恢复到 80%
### 查看日志
打开日志文件查看运行状态:
```
logs\remote_volume.log
```
日志会显示:
- 每次检测的时间
- RDP 连接/断开事件
- 音量调整记录
---
## 自定义配置
编辑 `config\config.ini`
```ini
[volume]
# 远程连接时音量0-100
remote_volume = 30
# 本地使用音量0-100
local_volume = 80
[monitor]
# 检测间隔(秒)
check_interval = 5
```
修改后重启程序生效。
---
## 常用操作
### 停止程序
`Ctrl + C` 停止运行中的程序。
### 开机自启(可选)
**方式 1使用任务计划程序**
1. 打开任务计划程序
2. 创建基本任务
3. 触发器:登录时
4. 操作:启动程序 `pythonw.exe`
5. 参数:`src\remote_volume_monitor.py`
**方式 2使用启动文件夹**
1. 创建批处理文件
2. 放到启动文件夹:`shell:startup`
---
## 遇到问题?
### 检查清单
- [ ] Python 3.8+ 已安装
- [ ] nircmd.exe 已放到 `tools\` 文件夹
- [ ] Windows Audio 服务正在运行
- [ ] 以普通用户权限运行即可
### 查看帮助
- 详细文档:`docs\` 文件夹
- 日志文件:`logs\remote_volume.log`
- 测试工具:`python src\test_rdp_detection.py`
---
*3 分钟完成设置,享受自动音量调节!*