Created
February 4, 2019 23:34
-
-
Save daretodave/d39e4a10a58245c1b54b0c7bd2f20152 to your computer and use it in GitHub Desktop.
Add WebStorm to right click context menu on windows. Save as a "ps1", run as admin.
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
$BIN = ("C:\Program Files\Jetbrains","$env:LOCALAPPDATA\Jetbrains") | |
$TOOL = Get-Childitem ` | |
-Recurse ` | |
–Path $BIN ` | |
-Filter webstorm64.exe ` | |
| Select-Object -first 1 ` | |
| %{$_.FullName} | |
if (!$TOOL) { | |
Write-Output "This script could not find webstorm " | |
return 0 | |
} | |
Write-Output "Found WS | $TOOL" | |
Write-Output "right click on files...." | |
reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /t REG_SZ /d "Open with WebStorm" /f | |
reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /t REG_EXPAND_SZ /v "Icon" /d "$TOOL,0" /f | |
reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm\command" /t REG_SZ /d "$TOOL" /f | |
Write-Output "right click in folder...." | |
reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\WebStorm" /t REG_SZ /d "Open with WebStorm" /f | |
reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\WebStorm" /t REG_EXPAND_SZ /v "Icon" /d "$TOOL,0" /f | |
reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\WebStorm\command" /t REG_SZ /d "$TOOL" /f | |
Write-Output "right click on folder...." | |
reg add "HKEY_CLASSES_ROOT\Directory\shell\WebStorm" /t REG_SZ /d "Open with WebStorm" /f | |
reg add "HKEY_CLASSES_ROOT\Directory\shell\WebStorm" /t REG_EXPAND_SZ /v "Icon" /d "$TOOL,0" /f | |
reg add "HKEY_CLASSES_ROOT\Directory\shell\WebStorm\command" /t REG_SZ /d "$TOOL" /f | |
Write-Output "done!" | |
return 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For my future self, here's a one-liner for powershell: