# Revert Cursor file associations and icons

**URL:** <https://forum.cursor.com/t/revert-cursor-file-associations-and-icons/31052>\
**Category:** Help\
**Created:** [November 28, 2024, 10:11pm UTC](https://forum.cursor.com/t/revert-cursor-file-associations-and-icons/31052 "2024-11-28T22:11:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cool-RR](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/cool-rr/32/13779_2.png) [@cool-RR](https://forum.cursor.com/u/cool-RR)\
**Post date:** [November 28, 2024, 10:11pm UTC](https://forum.cursor.com/t/revert-cursor-file-associations-and-icons/31052/1 "2024-11-28T22:11:15Z")

</div>

I use Cursor on Windows 10. I love Cursor, but I don’t love how it changed the icon of py files to the Cursor icon, and made Cursor the default program for opening Python files. How do I revert all the file associations and icons that Cursor set?

Thanks for your help,  
Ram Rachum.

---

<div class="post-metadata">

**Author:** ![wikrom99](https://avatars.discourse-cdn.com/v4/letter/w/e9c0ed/32.png) [@wikrom99](https://forum.cursor.com/u/wikrom99)\
**Post date:** [November 29, 2024, 7:29am UTC](https://forum.cursor.com/t/revert-cursor-file-associations-and-icons/31052/2 "2024-11-29T07:29:17Z")

</div>

I had the same issue, and running these commands in PowerShell as administrator fixed the problem for me.

```auto
# Remove all .py associations
Remove-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.py" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "HKEY_CLASSES_ROOT\.py" -Recurse -Force -ErrorAction SilentlyContinue

# Remove Cursor specific associations
Remove-Item -Path "HKEY_CLASSES_ROOT\Applications\cursor.exe" -Recurse -Force -ErrorAction SilentlyContinue

# Recreate Python associations
New-Item -Path "HKCU:\Software\Classes\.py" -Force
Set-ItemProperty -Path "HKCU:\Software\Classes\.py" -Name "(Default)" -Value "Python.File"

# Force the association again
cmd /c assoc .py=Python.File
cmd /c ftype Python.File="C:\Windows\py.exe" "%1" %*

# Restart Explorer
Stop-Process -Name explorer -Force
Start-Process explorer

```

(The sonnet 3.5 who created this)

---

<div class="post-metadata">

**Author:** ![cool-RR](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/cool-rr/32/13779_2.png) [@cool-RR](https://forum.cursor.com/u/cool-RR)\
**Post date:** [November 29, 2024, 9:18am UTC](https://forum.cursor.com/t/revert-cursor-file-associations-and-icons/31052/3 "2024-11-29T09:18:33Z")

</div>

Seems to work, thank you. However, Cursor does the same cursed thing to many other extensions, such as `js`. I hope I won’t have to do this exercise for all of them?

---

<div class="post-metadata">

**Author:** ![SoMaCoSF](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/somacosf/32/14963_2.png) [@SoMaCoSF](https://forum.cursor.com/u/SoMaCoSF)\
**Post date:** [April 4, 2025, 11:08pm UTC](https://forum.cursor.com/t/revert-cursor-file-associations-and-icons/31052/6 "2025-04-04T23:08:07Z")

</div>

I was a director of devops for a lot of names you know.

(at director level - im generally dealing with project plans and CFOs inability to understand technology)

–

The fundemental GREATNESS of an@Cursor agent to have admin access to my personal machines is that I know exactly how to prompt them to do super senior sysad stuff…

On my Shiny\_Objects’ ToDo list is to bring up the other laptop and have it fully configured to spec through my @cursor bot.

–

Ive already had it do various things to my other machines - but I want to bring up a vanila box (either W10 or Ubuntu, havent picked yet) – but to have the machine be managed by my @cursor bot – but I want it to pull from the @claude\_cli MCP for some more refined options and then, and this is good advice:

Every execution is wrapped into a .ps1 in a /scripts dir, and the descreptions and invocations are stored in .md and in a sqlite3 db - and an alias function to be able to pull the tools out as required – and the descriptions are to be a useable prompt by bot, such that I can query the tool library s1lite and say “from the tools give me XYZ” in the furture.

I already wrap ALL agentic actions in .ps1s with a geood header such that in addition to the development\_diary.rmd I always keep - I have a lit library of every agentic command run.

(and obv specStory (I made a tool that was better than spec story, but I lost it in the Hallucination Wars of 2024

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/127254_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 18, 2026, 10:37am UTC](https://forum.cursor.com/t/revert-cursor-file-associations-and-icons/31052/7 "2026-06-18T10:37:03Z")

</div>

Closed on June 18, 2026, 10:37am UTC


