2025-10-24 14:17:48 +00:00
{
"versions" : [
{
2026-04-21 01:56:58 +00:00
"version" : "3.1.17" ,
2025-10-24 14:17:48 +00:00
"queries" : {
2026-04-08 17:24:58 +00:00
"exists" : "SELECT 1 FROM programs WHERE name = 'Cursor' AND publisher = 'Anysphere';" ,
2026-04-21 01:56:58 +00:00
"patched" : "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM programs WHERE name = 'Cursor' AND publisher = 'Anysphere' AND version_compare(version, '3.1.17') < 0);"
2025-10-24 14:17:48 +00:00
} ,
2026-04-21 01:56:58 +00:00
"installer_url" : "https://downloads.cursor.com/production/fce1e9ab7844f9ea35793da01e634aa7e50bce90/win32/x64/system-setup/CursorSetup-x64-3.1.17.exe" ,
2025-10-24 14:17:48 +00:00
"install_script_ref" : "03589b5e" ,
"uninstall_script_ref" : "6c8096c5" ,
2026-04-21 01:56:58 +00:00
"sha256" : "14f6e7c8244175496bf8be1af05a7004d7013b6928576a0cdc350705baa8808d" ,
2025-10-24 14:17:48 +00:00
"default_categories" : [
2026-04-08 17:24:58 +00:00
"Developer tools"
2025-10-24 14:17:48 +00:00
]
}
] ,
"refs" : {
"03589b5e" : "# Learn more about .exe install scripts:\n# http://fleetdm.com/learn-more-about/exe-install-scripts\n\n$exeFilePath = \"${env:INSTALLER_PATH}\"\n\ntry {\n\n# Add arguments to install silently (Cursor uses an Inno Setup-based installer)\n$processOptions = @{\n FilePath = \"$exeFilePath\"\n ArgumentList = \"/SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /CLOSEAPPLICATIONS /MERGETASKS=!runcode\"\n PassThru = $true\n Wait = $true\n}\n \n# Start process and track exit code\n$process = Start-Process @processOptions\n$exitCode = $process.ExitCode\n\n# Prints the exit code\nWrite-Host \"Install exit code: $exitCode\"\nExit $exitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n" ,
"6c8096c5" : "# Attempts to locate Cursor's uninstaller from registry and execute it silently\n\n$displayName = \"Cursor\"\n$publisher = \"Anysphere\"\n\n$paths = @(\n 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall',\n 'HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall',\n 'HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall'\n)\n\n$uninstall = $null\nforeach ($p in $paths) {\n $items = Get-ItemProperty \"$p\\*\" -ErrorAction SilentlyContinue | Where-Object {\n $_.DisplayName -and ($_.DisplayName -eq $displayName -or $_.DisplayName -like \"$displayName*\") -and ($publisher -eq \"\" -or $_.Publisher -eq $publisher)\n }\n if ($items) { $uninstall = $items | Select-Object -First 1; break }\n}\n\nif (-not $uninstall -or -not $uninstall.UninstallString) {\n Write-Host \"Uninstall entry not found\"\n Exit 0\n}\n\n# Kill any running Cursor processes before uninstalling\nStop-Process -Name \"Cursor\" -Force -ErrorAction SilentlyContinue\n\n$uninstallCommand = $uninstall.UninstallString\n$uninstallArgs = \"/VERYSILENT /NORESTART\"\n\n# Parse the uninstall command to separate executable from existing arguments\n$splitArgs = $uninstallCommand.Split('\"')\nif ($splitArgs.Length -gt 1) {\n if ($splitArgs.Length -eq 3) {\n $existingArgs = $splitArgs[2].Trim()\n if ($existingArgs -ne '') {\n $uninstallArgs = \"$existingArgs $uninstallArgs\"\n }\n } elseif ($splitArgs.Length -gt 3) {\n Write-Host \"Error: Uninstall command contains multiple quoted strings\"\n Exit 1\n }\n $uninstallCommand = $splitArgs[1]\n}\n\nWrite-Host \"Uninstall command: $uninstallCommand\"\nWrite-Host \"Uninstall args: $uninstallArgs\"\n\ntry {\n $processOptions = @{\n FilePath = $uninstallCommand\n ArgumentList = $uninstallArgs\n NoNewWindow = $true\n PassThru = $true\n Wait = $true\n }\n \n $process = Start-Process @processOptions\n $exitCode = $process.ExitCode\n \n Write-Host \"Uninstall exit code: $exitCode\"\n Exit $exitCode\n} catch {\n Write-Host \"Error running uninstaller: $_\"\n Exit 1\n}\n"
}
2025-11-18 15:53:03 +00:00
}