Skip to content

Instantly share code, notes, and snippets.

@M1chaelTran
Created August 17, 2017 11:04
Show Gist options
  • Select an option

  • Save M1chaelTran/f22ac7c48466e8970f932ab743043e79 to your computer and use it in GitHub Desktop.

Select an option

Save M1chaelTran/f22ac7c48466e8970f932ab743043e79 to your computer and use it in GitHub Desktop.
Add `Open with WebStorm` to Windows right click context menu
@echo off
:: change the path below to match your installed version
SET WebStormPath=C:\Program Files\JetBrains\WebStorm 2017.2.2\bin\webstorm64.exe
echo Adding file entries
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /t REG_SZ /v "" /d "Open with WebStorm" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /t REG_EXPAND_SZ /v "Icon" /d "%WebStormPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm\command" /t REG_SZ /v "" /d "%WebStormPath% \"%%1\"" /f
echo Adding within a folder entries
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\WebStorm" /t REG_SZ /v "" /d "Open with WebStorm" /f
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\WebStorm" /t REG_EXPAND_SZ /v "Icon" /d "%WebStormPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\WebStorm\command" /t REG_SZ /v "" /d "%WebStormPath% \"%%V\"" /f
echo Adding folder entries
@reg add "HKEY_CLASSES_ROOT\Directory\shell\WebStorm" /t REG_SZ /v "" /d "Open with WebStorm" /f
@reg add "HKEY_CLASSES_ROOT\Directory\shell\WebStorm" /t REG_EXPAND_SZ /v "Icon" /d "%WebStormPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\Directory\shell\WebStorm\command" /t REG_SZ /v "" /d "%WebStormPath% \"%%1\"" /f
pause
@Guthix2827

Guthix2827 commented Jul 20, 2023

Copy link
Copy Markdown

thank you very much, still working!
tried on windows 10

@bagasdisini

Copy link
Copy Markdown

Thank you, still works at windows 11!

@derstine-buyagan-lmg

Copy link
Copy Markdown

Still works win11 Pro

@Worst45

Worst45 commented May 6, 2024

Copy link
Copy Markdown

I use this dirty hack to get the latest installed version of PHPStorm in "Program Files" (instead of giving the exact version in the script) :

set "PhpStormPath="
for /d %%A in ("C:\Program Files\JetBrains\PhpStorm*") do (
    set "PhpStormPath=%%~fA"
)

@AndrewBogdanovTSS

Copy link
Copy Markdown

This is something that was incorporated in the core of the Intellej familty of products so I don't think this thread is relevant any longer

@m4heshd

m4heshd commented May 6, 2024

Copy link
Copy Markdown

I use this dirty hack to get the latest installed version of PHPStorm in "Program Files" (instead of giving the exact version in the script) :

set "PhpStormPath="
for /d %%A in ("C:\Program Files\JetBrains\PhpStorm*") do (
    set "PhpStormPath=%%~fA"
)

You don't have to do any of that if you use the JetBrains Toolbox App.

This is something that was incorporated in the core of the Intellej familty of products so I don't think this thread is relevant any longer

Pretty sure there's no Explorer integration for directories yet.

@rklec

rklec commented Feb 23, 2026

Copy link
Copy Markdown

BTW the IntelliJ installer has an option to do it directly. However if installed via toolbox this does not work anymore, see TBX-2540 (jetbrains.com) TBX-2478 (jetbrains.com). A workaround is a community tool provided in https://github.com/246859/AutoToolBox/blob/main/README.en.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment