Skip to content

Instantly share code, notes, and snippets.

@imtipu
Created October 11, 2021 23:28
Show Gist options
  • Save imtipu/296a2651e460274c6c7b3b9960e3eee0 to your computer and use it in GitHub Desktop.
Save imtipu/296a2651e460274c6c7b3b9960e3eee0 to your computer and use it in GitHub Desktop.
Open With PyCharm Context Menu
@echo off
SET PyCharmPath=C:\Users\YOUR_USER_NAME\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\212.5284.44\bin\pycharm64.exe
echo Adding file entries
@reg add "HKEY_CLASSES_ROOT\*\shell\PyCharm" /t REG_SZ /v "" /d "Open in PyCharm" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\PyCharm" /t REG_EXPAND_SZ /v "Icon" /d "%PyCharmPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\PyCharm\command" /t REG_SZ /v "" /d "%PyCharmPath% \"%%1\"" /f
echo Adding within a folder entries
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\PyCharm" /t REG_SZ /v "" /d "Open with PyCharm" /f
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\PyCharm" /t REG_EXPAND_SZ /v "Icon" /d "%PyCharmPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\PyCharm\command" /t REG_SZ /v "" /d "%PyCharmPath% \"%%V\"" /f
echo Adding folder entries
@reg add "HKEY_CLASSES_ROOT\Directory\shell\PyCharm" /t REG_SZ /v "" /d "Open with PyCharm" /f
@reg add "HKEY_CLASSES_ROOT\Directory\shell\PyCharm" /t REG_EXPAND_SZ /v "Icon" /d "%PyCharmPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\Directory\shell\PyCharm\command" /t REG_SZ /v "" /d "%PyCharmPath% \"%%1\"" /f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment