Created
January 8, 2017 11:07
-
-
Save arieljannai/1ba3be6462428d98c1e1ac8e5d702adb to your computer and use it in GitHub Desktop.
Add PyCharm to context menu (right click menu)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
@rem throw this file in jetbrains installation folder, it takes the last created PyCharm folder (the latest ide update) for the script | |
FOR /F "delims=" %%i IN ('dir /b /ad-h /t:c /od -filter "PyCharm*"') DO SET a=%%i | |
SET PyCharmPath=C:\Program Files (x86)\JetBrains\%a%\bin\PyCharm64.exe | |
echo %PyCharmPath% | |
echo Adding file entries | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open in PyCharm" /t REG_SZ /v "" /d "Open in &PyCharm" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open in PyCharm" /t REG_EXPAND_SZ /v "Icon" /d "%PyCharmPath%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open in PyCharm\command" /t REG_SZ /v "" /d "%PyCharmPath% \"%%1\"" /f | |
echo Adding folder entries | |
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open directory in PyCharm" /t REG_SZ /v "" /d "Open directory in &PyCharm" /f | |
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open directory in PyCharm" /t REG_EXPAND_SZ /v "Icon" /d "%PyCharmPath%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open directory in PyCharm\command" /t REG_SZ /v "" /d "%PyCharmPath% \"%%1\"" /f | |
echo Adding folder background entries | |
@reg add "HKEY_CLASSES_ROOT\Directory\background\shell\Open directory in PyCharm" /t REG_SZ /v "" /d "Open directory in &PyCharm" /f | |
@reg add "HKEY_CLASSES_ROOT\Directory\background\shell\Open directory in PyCharm" /t REG_EXPAND_SZ /v "Icon" /d "%PyCharmPath%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\Directory\background\shell\Open directory in PyCharm\command" /t REG_SZ /v "" /d "%PyCharmPath% \"%%V\"" /f | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@echo off
SET PYCHARM_PATH=C:\Program Files (x86)\JetBrains\PyCharm 2023.2\bin\pycharm64.exe
SET ICON_PATH=%PYCHARM_PATH%,0
reg add "HKEY_CLASSES_ROOT*\shell\Open with PyCharm" /ve /d "Open with PyCharm" /f
reg add "HKEY_CLASSES_ROOT*\shell\Open with PyCharm" /v "Icon" /d "%ICON_PATH%" /f
reg add "HKEY_CLASSES_ROOT*\shell\Open with PyCharm\command" /ve /d ""%PYCHARM_PATH%" "%%1"" /f
reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with PyCharm" /ve /d "Open with PyCharm" /f
reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with PyCharm" /v "Icon" /d "%ICON_PATH%" /f
reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with PyCharm\command" /ve /d ""%PYCHARM_PATH%" "%%1"" /f
reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\Open with PyCharm" /ve /d "Open with PyCharm" /f
reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\Open with PyCharm" /v "Icon" /d "%ICON_PATH%" /f
reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\Open with PyCharm\command" /ve /d ""%PYCHARM_PATH%" "%%V"" /f
echo PyCharm context menu option and icon added.
pause