Skip to content

Instantly share code, notes, and snippets.

@M1chaelTran
Created August 17, 2017 11:04
Show Gist options
  • Star 79 You must be signed in to star a gist
  • Fork 16 You must be signed in to fork a gist
  • Save M1chaelTran/f22ac7c48466e8970f932ab743043e79 to your computer and use it in GitHub Desktop.
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
@ouweiya
Copy link

ouweiya commented Apr 21, 2022

If you only need to add a right-click menu to the file, you can use a simple registry to replace the installation path with your own, paying attention to path escaping.

Create a WebStorm.reg file, copy the code, and double-click to run it.

Windows Registry Editor Version 5.00

; Open files
[HKEY_CLASSES_ROOT\*\shell\WebStorm]
@="Open with WebStorm"
"Icon"="C:\\Program Files\\JetBrains\\WebStorm 2022.1\\bin\\webstorm64.exe,0"

[HKEY_CLASSES_ROOT\*\shell\WebStorm\command]
@="\"C:\\Program Files\\JetBrains\\WebStorm 2022.1\\bin\\webstorm64.exe\" \"%1\""

@Daniil-333
Copy link

Thank you very much!)))))

@CodeLikeAGirl29
Copy link

Greatly appreciate it!

@aychernov
Copy link

Спасибо! Thank u

@itsKnight847
Copy link

itsKnight847 commented Jul 20, 2023

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

@bagasdisini
Copy link

Thank you, still works at windows 11!

@derstine-buyagan-lmg
Copy link

Still works win11 Pro

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