Skip to content

Instantly share code, notes, and snippets.

@hs777it
Last active May 28, 2025 10:55
Show Gist options
  • Save hs777it/e331f56d933b879214ba8b92baad2cad to your computer and use it in GitHub Desktop.
Save hs777it/e331f56d933b879214ba8b92baad2cad to your computer and use it in GitHub Desktop.

Revisions

  1. hs777it revised this gist May 28, 2025. No changes.
  2. hs777it created this gist May 28, 2025.
    21 changes: 21 additions & 0 deletions Open with Android Studio.cmd
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    @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