How to add "Open folder as Android Studio project" to folders (in file explorer in windows) quick menu (right click).
-
Why nobody has an answer ?? – Sh.Raai Apr 11 '20 at 13:54
3 Answers
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.

- 119
- 1
- 10

- 224
- 4
- 7
-
Thanks for your response, I Tried your solution , this only open Android Studio but not open the selected folder in android studio window – Sh.Raai Sep 21 '20 at 20:16
-
1You 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 work – Haseeb Sajjad Sep 23 '20 at 06:17
-
Thanks Haseeb Sajjad , it worked for me too after separating the path and %1 with a space – Sh.Raai Sep 23 '20 at 12:35
-
It works but after every Android Studio update you will need to manually update .exe path. – t3ddys Aug 06 '21 at 21:58
-
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. – Lalit Fauzdar Oct 25 '21 at 14:11
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

- 57
- 7
Perhaps Haseeb Sajjad's answer didn't work for everyone. Try this in Sep 2022. Under Shell create a new key called Android Studio. The '(default)' key that was created can be named anything you want to see in the options when you right click a folder

- 31
- 1