From 719b418b7f52fb323ba95eefdb53091819161639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=85=8E=E9=A5=BC=E6=9E=9C=E5=AD=90=E5=8D=B7=E9=B2=A8?= =?UTF-8?q?=E9=B1=BC=E8=BE=A3=E6=A4=92?= Date: Tue, 4 Feb 2025 22:20:52 +0800 Subject: [PATCH] docs: Add detailed registry modification documentation to README files - Added comprehensive explanation of MachineGuid registry modification in both English and Chinese README files - Included safety measures, potential impacts, and recovery steps for registry changes - Updated Windows PowerShell script to provide additional registry modification information - Enhanced user awareness about system-level modifications and their implications --- README.md | 34 ++++++++++++++++++++++++++ README_CN.md | 34 ++++++++++++++++++++++++++ scripts/run/cursor_win_id_modifier.ps1 | 2 ++ 3 files changed, 70 insertions(+) diff --git a/README.md b/README.md index 596f3f6..c174c59 100644 --- a/README.md +++ b/README.md @@ -375,6 +375,40 @@ macOS/Linux users can try to locate similar `cursor-updater` directory in their - ✅ Error handling and recovery +
+Registry Modification Notice + +> ⚠️ **Important: This tool modifies the Windows Registry** + +#### Modified Registry +- Path: `Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography` +- Key: `MachineGuid` + +#### Potential Impact +Modifying this registry key may affect: +- Windows system's unique device identification +- Device recognition and authorization status of certain software +- System features based on hardware identification + +#### Safety Measures +1. Automatic Backup + - Original value is automatically backed up before modification + - Backup location: `%APPDATA%\Cursor\User\globalStorage\backups` + - Backup file format: `MachineGuid.backup_YYYYMMDD_HHMMSS` + +2. Manual Recovery Steps + - Open Registry Editor (regedit) + - Navigate to: `Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography` + - Right-click on `MachineGuid` + - Select "Modify" + - Paste the value from backup file + +#### Important Notes +- Verify backup file existence before modification +- Use backup file to restore original value if needed +- Administrator privileges required for registry modification +
+ --- ### 📚 Recommended Reading diff --git a/README_CN.md b/README_CN.md index f6e28ae..117d23b 100644 --- a/README_CN.md +++ b/README_CN.md @@ -304,6 +304,40 @@ winget install --id Microsoft.PowerShell --source winget ### 🔧 技术细节 +
+注册表修改说明 + +> ⚠️ **重要提示:本工具会修改系统注册表** + +#### 修改内容 +- 路径:`计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography` +- 项目:`MachineGuid` + +#### 潜在影响 +修改此注册表项可能会影响: +- Windows 系统对设备的唯一标识 +- 某些软件的设备识别和授权状态 +- 基于硬件标识的系统功能 + +#### 安全措施 +1. 自动备份 + - 每次修改前会自动备份原始值 + - 备份保存在:`%APPDATA%\Cursor\User\globalStorage\backups` + - 备份文件格式:`MachineGuid.backup_YYYYMMDD_HHMMSS` + +2. 手动恢复方法 + - 打开注册表编辑器(regedit) + - 定位到:`计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography` + - 右键点击 `MachineGuid` + - 选择"修改" + - 粘贴备份文件中的值 + +#### 注意事项 +- 建议在修改前先确认备份文件的存在 +- 如遇问题可通过备份文件恢复原始值 +- 必须以管理员权限运行才能修改注册表 +
+
配置文件 diff --git a/scripts/run/cursor_win_id_modifier.ps1 b/scripts/run/cursor_win_id_modifier.ps1 index 72b061f..777fc6b 100644 --- a/scripts/run/cursor_win_id_modifier.ps1 +++ b/scripts/run/cursor_win_id_modifier.ps1 @@ -203,6 +203,8 @@ function Update-MachineGuid { Set-ItemProperty -Path $registryPath -Name "MachineGuid" -Value $newMachineGuid Write-Host "$GREEN[信息]$NC 已更新系统 MachineGuid: $newMachineGuid" Write-Host "$GREEN[信息]$NC 原始值已备份至: $backupFile" + Write-Host "$GREEN[信息]$NC 注册表路径: 计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography" + Write-Host "$GREEN[信息]$NC 注册表项名: MachineGuid" } catch { Write-Host "$RED[错误]$NC 更新系统 MachineGuid 失败: $_"