android-studio-bundle-162.4069837-windows.exe /S
is installing Android studio to c:\program files\android\android studio. and SDK to %localappdata%\android\sdk.
In some forum it is mentioned to use /AllUsers to install SDK to all users.
I tried android-studio-bundle-162.4069837-windows.exe /S /AllUsers android-studio-bundle-162.4069837-windows.exe /S /ALLUSERS
But no use, it is installing to localappdata only.
And also even with /S I am getting screen as SDK missing on every launch even after configuring it.
I tried only studio installation without SDK with
https://developer.android.com/studio/index.html
"C:\Users\uday\Downloads\android-studio-ide-162.4069837-windows.exe" /S
And through shortcut launch I am installing the SDK to programdata and given full rights to all users to that folder.
If I see the settings are in c:\users\username.Android and .AndroidStudio2.3 folders.
But the same folders if I copy to other user, it is taking the SDK folder as programdata only but giving prompt as SDK not detected and need to download again,even if I skip it and go to settings, it is showing empty there pointing to the same folder.
Any suggestions?
There doesn't seem to be any built-in way to do it, but here is what I did. YMMV. Also, I'm doing this from the perspective of a classroom where student user profiles get wiped out at reboot.
Install A.S. 3.0.x.
Login as a limited user (no admin rights). Run A.S., go into settings, and change the SDK location to (example) c:\AndroidStudioSDK. Make sure you created this folder as the limited user.
Completely update, install desired SDKs and components, and build a project, resolving all missing components and issues.
File > Invalidate Caches and click Invalidate. Then File > Export Settings, and save it to the desktop. Then delete or move the following folders out of the user's home folder: .android, .AndroidStudio3.0, and .Gradle. Run A.S. but cancel the wizard, select Do not re-run the setup wizard, click Configure > Import settings, and import the settings.jar file from the desktop. Once it has restarted, you can click Configure > SDK Manager to verify it still points to your custom location.
Close A.S., then copy the (now small) .android and .AndroidStudio3.0 folders to c:\users\default.
Voila. Any new user that signs in should have a ready environment that points to a centrally located SDK folder. You can copy the SDK folder and the default user folders to each lab PC.
I've included a (sanitized) Windows batch file that I used when deploying.
Hope this helps.