Skip to content

Instantly share code, notes, and snippets.

@kumaran-IV0IV
Last active March 7, 2024 14:53
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save kumaran-IV0IV/9eaee2987934df1244765441dc36e5e6 to your computer and use it in GitHub Desktop.
Save kumaran-IV0IV/9eaee2987934df1244765441dc36e5e6 to your computer and use it in GitHub Desktop.
Add `Open with Android Studio` to Windows right click context menu
@echo off
:: change the path below to match your installed version
SET AndroidStudioPath=C:\Program Files\Android\Android Studio\bin\studio64.exe
echo Adding file entries
@reg add "HKEY_CLASSES_ROOT\*\shell\AndroidStudio" /t REG_SZ /v "" /d "Open with AndroidStudio" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\AndroidStudio" /t REG_EXPAND_SZ /v "Icon" /d "%AndroidStudioPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\AndroidStudio\command" /t REG_SZ /v "" /d "%AndroidStudioPath% \"%%1\"" /f
echo Adding within a folder entries
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\AndroidStudio" /t REG_SZ /v "" /d "Open with AndroidStudio" /f
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\AndroidStudio" /t REG_EXPAND_SZ /v "Icon" /d "%AndroidStudioPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\AndroidStudio\command" /t REG_SZ /v "" /d "%AndroidStudioPath% \"%%V\"" /f
echo Adding folder entries
@reg add "HKEY_CLASSES_ROOT\Directory\shell\AndroidStudio" /t REG_SZ /v "" /d "Open with AndroidStudio" /f
@reg add "HKEY_CLASSES_ROOT\Directory\shell\AndroidStudio" /t REG_EXPAND_SZ /v "Icon" /d "%AndroidStudioPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\Directory\shell\AndroidStudio\command" /t REG_SZ /v "" /d "%AndroidStudioPath% \"%%1\"" /f
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment