Last active
December 15, 2020 20:49
-
-
Save pblanton/52cebb617146f7147718a75fa5a9f74c to your computer and use it in GitHub Desktop.
Windows Context Menu Items
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
# Taken from https://gist.github.com/mac2000/cd3560b98ca5e23abe9f3166e40d2ed2 | |
@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