-
-
Save rwatts3/8fa7e1d5172fd48a446d89acd3f3f0fc to your computer and use it in GitHub Desktop.
Open with WebStorm context menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
REM Remove registry if any | |
REG DELETE "HKEY_CLASSES_ROOT\Directory\shell\WebStorm" /f | |
REM Get WebStorm executable path | |
FOR /F "usebackq tokens=3*" %%A IN (`REG QUERY "HKEY_CLASSES_ROOT\Applications\WebStorm.exe\shell\open\command"`) DO ( | |
SET WEBSTORM=%%A %%B | |
) | |
REM Remove ' "%1"' from it | |
SET WEBSTORM=%WEBSTORM:~0,-5% | |
REM Add registry keys | |
REG ADD "HKEY_CLASSES_ROOT\Directory\shell\WebStorm" /t REG_SZ /v "" /d "Open directory in WebStorm" /f | |
REG ADD "HKEY_CLASSES_ROOT\Directory\shell\WebStorm" /t REG_EXPAND_SZ /v "Icon" /d "%WEBSTORM%,0" /f | |
REG ADD "HKEY_CLASSES_ROOT\Directory\shell\WebStorm\command" /t REG_SZ /v "" /d "%WEBSTORM% \"%%1\"" /f | |
PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment