Technical Details - RiadDeveloper/Cursor-Machine-ID-Reset-Tool GitHub Wiki
The Cursor Reset Tool is a PowerShell script that resets machine identifiers used by Cursor IDE. This document explains the technical aspects of how the tool works and what files it modifies.
The tool operates on files in the following locations:
%APPDATA%\Cursor\
├── machineId
├── User\
└── globalStorage\
├── storage.json
└── state.vscdb
The tool generates several unique identifiers:
-
devDeviceId
- Format: UUID (e.g., "550e8400-e29b-41d4-a716-446655440000")
- Used as: Primary device identifier
-
machineId
- Format: 64-character hexadecimal string
- Generated using: Cryptographic random number generator
-
macMachineId
- Format: 128-character hexadecimal string
- Generated using: Cryptographic random number generator
-
sqmId
- Format: Bracketed UUID (e.g., "{550E8400-E29B-41D4-A716-446655440000}")
- Used for: System Quality Metrics
- Location:
%APPDATA%\Cursor\machineId
- Content: Contains only the devDeviceId
- Format: Plain text file
- Location:
%APPDATA%\Cursor\User\globalStorage\storage.json
- Modified Keys:
{ "telemetry.devDeviceId": "<uuid>", "telemetry.machineId": "<64-char-hex>", "telemetry.macMachineId": "<128-char-hex>", "telemetry.sqmId": "<bracketed-uuid>", "storage.serviceMachineId": "<uuid>" }
- Location:
%APPDATA%\Cursor\User\globalStorage\state.vscdb
- Table: ItemTable
- Modified using Python's sqlite3 module
- Updated Keys:
- telemetry.devDeviceId
- telemetry.macMachineId
- telemetry.machineId
- telemetry.sqmId
- storage.serviceMachineId
-
Backup Creation
- Automatic backup of all modified files
- Backup files created with
.backup
extension - Original files preserved before modifications
-
Permission Checks
- Verifies administrator privileges
- Checks file access permissions
- Validates file existence before modifications
-
Safe Operations
- Uses secure random number generation
- Implements proper error handling
- Validates file operations
-
PowerShell
- Version: Windows PowerShell 5.1 or later
- Required Modules: None (uses built-in cmdlets)
-
Python
- Used for: SQLite database modifications
- Required Module: sqlite3 (built into Python)
- Optional: Script can run without Python, but SQLite updates will be skipped
The script implements comprehensive error handling:
-
Pre-execution Checks
- Administrator privileges
- Cursor process status
- File existence and accessibility
-
Operation Validation
- Validates generated IDs
- Verifies file writes
- Confirms database updates
-
Recovery Options
- Automatic rollback capabilities
- Backup file restoration
- Clear error messages and instructions
- Average execution time: 2-5 seconds
- Minimal system resource usage
- No network operations
- Small file footprint