- will attempt to uninstall 0.1.x if it's found see updating instructions here that warn of issues installing over top http://developer.android.com/sdk/installing/studio.html
23 lines
477 B
PowerShell
23 lines
477 B
PowerShell
$package = 'AndroidStudio'
|
|
|
|
try
|
|
{
|
|
$uninstall = Join-Path $Env:LOCALAPPDATA 'Android\android-studio\uninstall.exe'
|
|
|
|
#uses NSIS installer - http://nsis.sourceforge.net/Docs/Chapter3.html
|
|
$uninstallParams = @{
|
|
PackageName = $package;
|
|
FileType = 'exe';
|
|
SilentArgs = '/S';
|
|
File = $uninstall;
|
|
}
|
|
|
|
Uninstall-ChocolateyPackage @uninstallParams
|
|
Write-ChocolateySuccess $package
|
|
}
|
|
catch
|
|
{
|
|
Write-ChocolateyFailure $package "$($_.Exception.Message)"
|
|
throw
|
|
}
|