Skip to content

Commit

Permalink
Update iTunes package to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
lennartb- authored and AdmiringWorm committed Feb 3, 2017
1 parent bc81f58 commit a7830f3
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit a7830f3

Please sign in to comment.