Better way to install Android Studio for all users?
07/27/2018 1987 views
I've spent much more time than I should trying to create an unattended installation of Android Studio for lab computers. The program is designed to allow each user to customize their installation by saving program data to each user's App Data folder. In practice, this means that each student that sits down at a lab machine has to launch the software and then initiate a 1+GB download, install, and program restart.
This is a round-about way to solve this problem, but after scouring online tips, not finding any concise instructions for enterprise installations, and attempting older documentation that I couldn't get working, the solution I settled on for deploying to all users on lab machines is as follows:
Post-installation step 1 - Install Android Studio
android-studio-ide-VERSION.NUMBER-windows.exe /S /Allusers
Post-installation step 2 - create all-user access to by-design user-profile-based sdk files
On a clean test machine, launch Android Studio and install updates. Save the contents of the updated user's "AppData\Local\Android\Sdk" folder.
Create a second post-installation task that does the following (I'd separated this task from the actual installation for troubleshooting):
- copies the saved content from the \AppData\Local\Android\Sdk folder above into a custom folder in "C:\Program Files\Android\"
- puts a script in "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\" that creates a hard link from "%USERPROFILE%\AppData\Local\Android\Sdk" to "C:\Program Files\Android\custom"
This seems to work. When a new user logs in and launches Android Studio, it sees that is is up to date and does not prompt for an additional 1+GB download, installation, and program restart. The default project file is still in the user's own profile.
Does anyone else have a better way to set up Android Studio for all users?