Skip to content

Instantly share code, notes, and snippets.

@badrshs
Last active September 4, 2018 17:20
Show Gist options
  • Save badrshs/023ee11aff9d52bdfdb68b9b3bcce22c to your computer and use it in GitHub Desktop.
Save badrshs/023ee11aff9d52bdfdb68b9b3bcce22c to your computer and use it in GitHub Desktop.
Add context menu to Windows 10 to open file/folder in PhpStorm Or Webstorm
::download this bat file then Run as Administrator Or do the other steps
::------------------------------------------------------------------
::Create a file name it webstorm.bat
::Open file in any text editor
::Copy all text below from @echo off to pause and paste it in the file
::Consider replace the <Webstorm.exe path> with your webstorm.exe path
::for e.g
::C:\Program Files\JetBrains\WebStorm 2017.2.2\bin\webstorm64.exe
::Save changes to the file
::Right click on the file then Run as Administrator
::Enjoy it!
@echo off
::dont forget to replace <Webstorm.exe path> with your directory
SET WebStormPath=<Webstorm.exe path>
echo Adding file entries
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /t REG_SZ /v "" /d "Open w&ith 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 folder entries
@reg add "HKEY_CLASSES_ROOT\Directory\shell\WebStorm" /t REG_SZ /v "" /d "Open w&ith 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
echo Adding folder backgrounds
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\WebStorm" /t REG_SZ /v "" /d "Open w&ith 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
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment