🖱️ Open with Cursor in Context Menu
This project provides PowerShell scripts to add and remove "Open with Cursor" options to the Windows context menu for files, folders, and background areas.
✨ Features
- Adds "Open with Cursor" option to:
- File context menu 📄
- Folder context menu 📁
- Background context menu (when right-clicking in an empty area of a folder) 🖼️
- Removes these context menu entries with uninstalling script 🗑️
🚀 Installation
- Download the
install-open-with-cursor.ps1script from https://github.com/Puliczek/open-with-cursor-context-menu/raw/main/install-open-with-cursor.ps1 - Right-click on the downloaded script and select "Run with PowerShell".
- If prompted, allow the script to run with administrator privileges.
The script will automatically add the "Open with Cursor" options to your context menus. ✅
Or choose cursorOpenFolder.bat (Thanks to @eatcosmos) (.reg method)
🔧 Troubleshooting
If you see following tips: can not load ...., seee about_Execution_Policies
You need to run command like
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
It will allow you run ps1 scripts from github, after done, please run following command to reset it
Set-ExecutionPolicy -ExecutionPolicy Default -Scope CurrentUser
If the context menu options don't appear immediately after running the installation script:
Restart Windows Explorer using Terminal:
- Press Win + X and select "Terminal (Admin)"
- Run the following command:
Stop-Process -Name explorer -Force; Start-Process explorer
This command will close and restart Windows Explorer, which should refresh your context menu without requiring a full system restart. 🔄🖱️
🗑️ Uninstallation
- Download the
uninstall-open-with-cursor.ps1script from https://github.com/Puliczek/open-with-cursor-context-menu/raw/main/uninstall-open-with-cursor.ps1 - Right-click on the downloaded script and select "Run with PowerShell".
- If prompted, allow the script to run with administrator privileges.
The script will remove all "Open with Cursor" entries from your context menus. ❌
🛠️ How It Works
Installation Script 📥
The install-open-with-cursor.ps1 script:
- Checks for administrator privileges and re-launches with elevated rights if necessary.
- Locates the Cursor executable in the default installation directory.
- Adds registry entries for the context menu options.
Uninstallation Script 🗑️
The uninstall-open-with-cursor.ps1 script:
- Checks for administrator privileges and re-launches with elevated rights if necessary.
- Removes the registry entries added by the installation script.
📝 Notes
- Both scripts require administrator privileges to modify the registry.
- The installation script assumes Cursor is installed in its default location. If you've installed Cursor in a different location, you may need to modify the script.
🤝 Contributing
Feel free to fork this project and submit pull requests for any improvements or bug fixes.
📄 License
This project is open source and available under the MIT License. 📜
