-
-
Save higstar/93b74522beb0e7597c70dab442ebf2cf 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 | |
SET JetBrainsPath=C:\Program Files\JetBrains | |
FOR /F "delims=" %%i IN ('dir /b /ad-h /t:c /od -filter "%JetBrainsPath%\PyCharm*"') DO SET a=%%i | |
SET PyCharmPath=%JetBrainsPath%\%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