Skip to content

Instantly share code, notes, and snippets.

@AnandPilania
Created March 19, 2021 11:40
Show Gist options
  • Save AnandPilania/9c119dda28775c623d0ae15083f5fc35 to your computer and use it in GitHub Desktop.
Save AnandPilania/9c119dda28775c623d0ae15083f5fc35 to your computer and use it in GitHub Desktop.
`Open with IntelliJ` to context menu
SET IntelliJPath=INTELLIJ_EXE_PATH{ex DIR\bin\idea64.exe}
echo Adding file entries
@reg add "HKEY_CLASSES_ROOT\*\shell\IntelliJ" /t REG_SZ /v "" /d "Open in IntelliJ" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\IntelliJ" /t REG_EXPAND_SZ /v "Icon" /d "%IntelliJPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\IntelliJ\command" /t REG_SZ /v "" /d "%IntelliJPath% \"%%1\"" /f
echo Adding within a folder entries
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\IntelliJ" /t REG_SZ /v "" /d "Open in IntelliJ" /f
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\IntelliJ" /t REG_EXPAND_SZ /v "Icon" /d "%IntelliJPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\IntelliJ\command" /t REG_SZ /v "" /d "%IntelliJPath% \"%%V\"" /f
echo Adding folder entries
@reg add "HKEY_CLASSES_ROOT\Directory\shell\IntelliJ" /t REG_SZ /v "" /d "Open in IntelliJ" /f
@reg add "HKEY_CLASSES_ROOT\Directory\shell\IntelliJ" /t REG_EXPAND_SZ /v "Icon" /d "%IntelliJPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\Directory\shell\IntelliJ\command" /t REG_SZ /v "" /d "%IntelliJPath% \"%%1\"" /f
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment