Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(iTunes) Update to latest version and fix install errors #527

Merged
merged 3 commits into from
Feb 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions automatic/iTunes/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ $packageArgs = @{
checksumType64 = 'sha256'
silentArgs = "/qn /norestart"
validExitCodes = @(0, 2010, 1641)
unzipLocation = Get-PackageCacheLocation
unzipLocation = Get-PackageCacheLocation
}

$app = Get-UninstallRegistryKey -SoftwareName $packageArgs.softwareName | select -first 1

if ($app -and ([version]$app.Version -ge [version]$version)) {
if ($app -and ([version]$app.DisplayVersion -ge [version]$version) -and ($env:ChocolateyForce -ne $true)) {
Write-Host "iTunes $version or higher is already installed."
Write-Host "No need to download and install again"
return;
Expand All @@ -37,4 +37,4 @@ foreach ($msiFile in $msiFileList) {
Install-ChocolateyInstallPackage @packageArgs
}

Remove-Item $packageArgs.unzipLocation -Recurse
Remove-Item $packageArgs.unzipLocation -Recurse -Force -ea 0