iTunes self-healing(I think?) after install

Topics: Archive - Deployment Scripts
Aug 15, 2014 at 10:23 PM
Hey Guys,

I'm having a weird issue installing iTunes with the PSADT. When iTunes is first run, an MSI window with a progress bar shows briefly, and then iTunes opens up. This doesn't happen if I install iTunes with the default bootstrapper from Apple. I'm not really familiar with MSIs, so is there a log that I can check to see what's causing the configuration, or what might be a repair action happening?

Here is the snippet of the deploy-application.ps1:
If ($deploymentType -ne "uninstall") { $installPhase = "Pre-Installation"
    # Show Welcome Message, close applications if required, allow up to 3 deferrals, and persist the prompt
    Show-InstallationWelcome -CloseApps "Outlook,AppleMobileDeviceHelper,itunes,ituneshelper,softwareupdate" -AllowDefer -DeferTimes 3 -PersistPrompt

    # Show Progress Message (with the default message)
    # Remove any previous versions of Adobe Reader
    Remove-MSIApplications "Apple,itunes,Bonjour,Quicktime"
$installPhase = "Installation"

    # Install AppleApplicationSupport
    Execute-MSI -Action Install -Path "AppleApplicationSupport.msi"
    # Install AppleMobileDeviceSupport
    Execute-MSI -Action Install -Path "AppleMobileDeviceSupport64.msi"
    # Install Bonjour
    Execute-MSI -Action Install -Path "Bonjour64.msi"
    # Install iTunes
    Execute-MSI -Action Install -Path "iTunes64.msi"

$installPhase = "Post-Installation"

    # Remove About iTunes
    Remove-File -Path "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\iTunes\About iTunes.lnk"
    Set-RegistryKey -Key "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apple Computer, Inc.\iTunes\Parental Controls\Default" -Name "AdminFlags" -Value "16777473" -Type "DWord"
Aug 21, 2014 at 8:34 AM
Probably more a question for ITNinja.
Oct 29, 2014 at 8:06 PM
I think I've found the solution to this. Add the iTunes64Setup.exe file to your "Files" folder, delete iTunes64.msi, and replace
Execute-MSI -Action Install -Path "iTunes64.msi"
Execute-Process -FilePath "iTunes64Setup.exe" -Arguments "/quiet /norestart" -WaitForMsiExec
Note that you do still need to use Execute-MSI to install Apple Application Support, etc., despite those files being present within the iTunes64Setup.exe package. They aren't installed when the bootstrap installer is run with the /quiet switch for whatever reason.

Also, you probably don't want to remove QuickTime in your Remove-MSIApplications entry as it is no longer included with iTunes. In fact, I don't think it's necessary to remove any of the previous versions of the supporting applications as the MSI installers for the new versions will take care of that.