Skip to content

Instantly share code, notes, and snippets.

@glendonyeo
Forked from amnuts/phpstorm.bat
Last active June 20, 2018 14:26
Show Gist options
  • Save glendonyeo/c9c274951cd41805e7a8c6850bbf3720 to your computer and use it in GitHub Desktop.
Save glendonyeo/c9c274951cd41805e7a8c6850bbf3720 to your computer and use it in GitHub Desktop.
Add context menu to Windows 7 to open file/folder in PhpStorm
@echo off
SET PhpStormPath=C:\Program Files\JetBrains\PhpStorm 2017.1.4\bin\PhpStorm64.exe
echo Adding file entries
@reg add "HKEY_CLASSES_ROOT\*\shell\PhpStorm" /t REG_SZ /v "" /d "Open with PhpStorm" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\PhpStorm" /t REG_EXPAND_SZ /v "Icon" /d "%PhpStormPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\PhpStorm\command" /t REG_SZ /v "" /d "%PhpStormPath% \"%%1\"" /f
echo Adding folder entries
@reg add "HKEY_CLASSES_ROOT\Directory\shell\PhpStorm" /t REG_SZ /v "" /d "Open with PhpStorm" /f
@reg add "HKEY_CLASSES_ROOT\Directory\shell\PhpStorm" /t REG_EXPAND_SZ /v "Icon" /d "%PhpStormPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\Directory\shell\PhpStorm\command" /t REG_SZ /v "" /d "%PhpStormPath% \"%%1\"" /f
echo Adding folder entries
@reg add "HKEY_CLASSES_ROOT\Directory\background\shell\PhpStorm" /t REG_SZ /v "" /d "Open with PhpStorm" /f
@reg add "HKEY_CLASSES_ROOT\Directory\background\shell\PhpStorm" /t REG_EXPAND_SZ /v "Icon" /d "%PhpStormPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\Directory\background\shell\PhpStorm\command" /t REG_SZ /v "" /d "%PhpStormPath% \"%%v\"" /f
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment