Open folder as android studio project
Asked Answered
E

4

9

How to add "Open folder as Android Studio project" to folders (in file explorer in windows) quick menu (right click).

screenshot with that option for IntelliJ Idea

Extrauterine answered 4/4, 2020 at 23:45 Comment(1)
Why nobody has an answer ??Extrauterine
L
15

Open windows registry by pressing Window + r type regedit and enter Run the registry editor Go to HKEY_CLASSES_ROOT\Directory\shell Right click on shell create a new key and name it as you want to see the entry in context menu then right click on the created file and create a new key and name it as command in lower case Click command and on right side pane you will see a key named as default Double click the default entry and enter the path of application exe file as the value. You need enter a spacebar then %1 at the end of application path that you entered as a value of default value. It worked for me.

Lauralee answered 18/9, 2020 at 17:29 Comment(5)
Thanks for your response, I Tried your solution , this only open Android Studio but not open the selected folder in android studio windowExtrauterine
You need enter %1 at the end of application path that you entered as a value of default value. its working fine for me. let me know in case it doesnt workLauralee
Thanks Haseeb Sajjad , it worked for me too after separating the path and %1 with a spaceExtrauterine
It works but after every Android Studio update you will need to manually update .exe path.Helvetian
Remember, Default String value in the first key you create and name will be the text you'll see in the context menu, so change it similar to "Open Folder as Android Studio Project" and You can also create a new String value in this key, name it icon and set its value to Android Studio's exe path without quotes.Stonedeaf
B
2

Just save this as a .cmd file and run. Be sure to change the path to your android studio installation path.

        @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

Here's the gist

Blowtorch answered 5/4, 2022 at 5:43 Comment(1)
make sure to run this command as administratorAltorelievo
F
0

Answered By App is working as expected and also you will know how to do this manually to open registry folder type follow this steps

  • click (windows + r)
  • type (regedit) and click Ok
  • scroll down to this location HKEY_CLASSES_ROOT\Directory\shell
  • and follow App answer
Firm answered 13/5, 2024 at 6:16 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.