CursorLoginByC/docs/设备号获取机制.md
2026-04-17 14:54:33 +08:00

26 lines
694 B
Markdown
Raw Permalink 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. 主板序列号(`Win32_BaseBoard.SerialNumber`
2. CPU 处理器 ID`Win32_Processor.ProcessorId`
3. Windows UUID优先读取注册表 `MachineGuid`,失败时回退 `Win32_ComputerSystemProduct.UUID`
## 拼接规则
最终格式:
`主板序列号-CPU处理器ID-WindowsUUID`
示例:
`MB1234567890-BFEBFBFF000906EA-2E6A6E0D1C4B4D4A8F6E9D4E06F4AB12`
## 容错策略
- 任一字段为空或读取失败时,使用 `NA` 占位
- 每段值会先做标准化处理:
- 去掉首尾空白
- 去掉中间空格
- 去掉 `-`(避免与分隔符冲突)