From 8c3e6a7dd09698ae93cf2a407d63b8933dfadb6c 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: Sat, 11 Jan 2025 23:27:44 +0800 Subject: [PATCH] Add manual auto-update disable instructions in README files and update cursor_win_id_modifier.ps1 script - Introduced a new section in both English and Chinese README files detailing how users can manually disable the auto-update feature for Windows and macOS/Linux. - Updated the cursor_win_id_modifier.ps1 script to prompt users for disabling auto-update, providing a more interactive experience and handling the creation of a blocking file. - Enhanced documentation to improve user guidance and control over the application settings. --- README.md | 11 +++++++ README_CN.md | 11 +++++++ scripts/run/cursor_win_id_modifier.ps1 | 41 ++++++++++++++++++++++++-- 3 files changed, 61 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a08178f..ad53efb 100644 --- a/README.md +++ b/README.md @@ -181,6 +181,17 @@ The tool generates new unique identifiers for: - `telemetry.sqmId` +
+Manual Auto-Update Disable + +Windows users can manually disable the auto-update feature: +1. Close all Cursor processes +2. Delete directory: `C:\Users\username\AppData\Local\cursor-updater` +3. Create a file with the same name: `cursor-updater` (without extension) + +macOS/Linux users can try to locate similar `cursor-updater` directory in their system and perform the same operation. +
+
Safety Features diff --git a/README_CN.md b/README_CN.md index 619ec4f..454189d 100644 --- a/README_CN.md +++ b/README_CN.md @@ -176,6 +176,17 @@ irm https://aizaozao.com/accelerate.php/https://raw.githubusercontent.com/yuaoti - `telemetry.sqmId`
+
+手动禁用自动更新 + +Windows用户可以手动禁用自动更新功能: +1. 关闭所有Cursor进程 +2. 删除目录:`C:\Users\用户名\AppData\Local\cursor-updater` +3. 创建同名文件:`cursor-updater`(不带扩展名) + +macOS/Linux用户可以尝试在系统中找到类似的`cursor-updater`目录进行相同操作。 +
+
安全特性 diff --git a/scripts/run/cursor_win_id_modifier.ps1 b/scripts/run/cursor_win_id_modifier.ps1 index d84af83..161b963 100644 --- a/scripts/run/cursor_win_id_modifier.ps1 +++ b/scripts/run/cursor_win_id_modifier.ps1 @@ -160,8 +160,6 @@ Write-Host "$BLUE[调试]$NC macMachineId: $MAC_MACHINE_ID" Write-Host "$BLUE[调试]$NC devDeviceId: $UUID" Write-Host "$BLUE[调试]$NC sqmId: $SQM_ID" - - # 显示文件树结构 Write-Host "" Write-Host "$GREEN[信息]$NC 文件结构:" @@ -179,7 +177,46 @@ if ($backupFiles) { } else { Write-Host "│ └── (空)" } + +# 询问是否要禁用自动更新 Write-Host "" +Write-Host "$YELLOW[询问]$NC 是否要禁用 Cursor 自动更新功能?" +Write-Host "0) 否 - 保持默认设置 (按回车键)" +Write-Host "1) 是 - 禁用自动更新" +$choice = Read-Host "请输入选项 (1 或直接回车)" + +if ($choice -eq "1") { + Write-Host "" + Write-Host "$GREEN[信息]$NC 正在处理自动更新..." + $updaterPath = "$env:LOCALAPPDATA\cursor-updater" + + if (Test-Path $updaterPath) { + try { + # 强制删除目录 + Remove-Item -Path $updaterPath -Force -Recurse -ErrorAction Stop + Write-Host "$GREEN[信息]$NC 成功删除 cursor-updater 目录" + + # 创建同名文件 + New-Item -Path $updaterPath -ItemType File -Force | Out-Null + Write-Host "$GREEN[信息]$NC 成功创建阻止文件" + } + catch { + Write-Host "$RED[错误]$NC 处理 cursor-updater 时出错: $_" + } + } + else { + # 直接创建阻止文件 + New-Item -Path $updaterPath -ItemType File -Force | Out-Null + Write-Host "$GREEN[信息]$NC 成功创建阻止文件" + } +} +elseif ($choice -ne "") { + Write-Host "$YELLOW[信息]$NC 保持默认设置,不进行更改" +} +else { + Write-Host "$YELLOW[信息]$NC 保持默认设置,不进行更改" +} + # 显示公众号信息 Write-Host "" Write-Host "$GREEN================================$NC"