Install iTunes using SCCM
Scripted Installation of iTunes via SCCM package
iTunes 12.9.3.3
The iTunes one of the difficult application to package and deploy.The below scripts help you to put all the msi into single rapper script so you could install it in one go. Remember it needs to install on specif order in the power shell script. Make sure you have the msi extracted to shared application folder location in the SCCM server. Install script you may need to save it as .ps1 and other as a bat file. If you install later version of iTunes you might need to install them manually to find all the uninstall strings from the reg key information and update the uninstall script accordingly.
Install script (Powershell)
..................................................................................................................................................................
set working directory
$CurrentLocation = Split-Path -Parent $MyInvocation.MyCommand.Path;
name MSI files
$App1 = "AppleApplicationSupport.msi"
$App2 = "AppleApplicationSupport64.msi"
$App3 = "AppleMobileDeviceSupport6464.msi"
$App4 = "AppleSoftwareUpdate.msi"
#$App5 = "Bonjour64.msi"
$App6 = "iTunes64.msi"
set install arguments
$InstArgs1 = "/qb /norestart"
install
Start-Process -FilePath msiexec -ArgumentList "/i $App1 $InstArgs1" -WorkingDirectory $CurrentLocation -Wait -PassThru
Start-Process -FilePath msiexec -ArgumentList "/i $App2 $InstArgs1" -WorkingDirectory $CurrentLocation -Wait -PassThru
Start-Process -FilePath msiexec -ArgumentList "/i $App3 $InstArgs1" -WorkingDirectory $CurrentLocation -Wait -PassThru
Start-Process -FilePath msiexec -ArgumentList "/i $App4 $InstArgs1" -WorkingDirectory $CurrentLocation -Wait -PassThru
#Start-Process -FilePath msiexec -ArgumentList "/i $App5 $InstArgs1" -WorkingDirectory $CurrentLocation -Wait -PassThru
Start-Process -FilePath msiexec -ArgumentList "/i $App6 $InstArgs1" -WorkingDirectory $CurrentLocation -Wait -PassThru
cleanup
If (Test-Path c:\Users\Public\Desktop\iTunes.lnk) {
Remove-Item "c:\Users\Public\Desktop\iTunes.lnk" -force
}
If (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "iTunesHelper") {
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "iTunesHelper"
}
exit asking for reboot
exit 3010
...................................................................................................................................................................
@echo off
cls
echo.
==================================================================
echo ITunes silent uninstall
===================================================================
Rem Bonur silent uninstall
MsiExec.exe /x{56DDDFB8-7F79-4480-89D5-25E1F52AB28F} /qn
Rem iTunes silent uninstall
MsiExec.exe /x{6075F4D5-FEE4-4858-9F9F-0AECA2A5F673} /qn
REM Apple Application Support (64-bit) silent uninstall
MsiExec /x {F8060941-C0AB-4BCE-88AC-F2FDA2E9F286} /qn
REM Apple Mobile Device Support silent uninstall
MsiExec /x {5FA8C4BE-8C74-4B9C-9B49-EBF759230189} /qn
REM Apple Application Support (32-bit) silent uninstall
MsiExec /x {5A659BE5-849B-484E-A83B-DCB78407F3A4} /qn
REM Apple Software Update silent uninstall
MsiExec /x {A30EA700-5515-48F0-88B0-9E99DC356B88} /qn
Echo Done
Uninstall script (bat)
...................................................................................................................................................................
@echo off
cls
echo.
==================================================================
echo ITunes silent uninstall
===================================================================
Rem Bonur silent uninstall
MsiExec.exe /x{56DDDFB8-7F79-4480-89D5-25E1F52AB28F} /qn
Rem iTunes silent uninstall
MsiExec.exe /x{6075F4D5-FEE4-4858-9F9F-0AECA2A5F673} /qn
REM Apple Application Support (64-bit) silent uninstall
MsiExec /x {F8060941-C0AB-4BCE-88AC-F2FDA2E9F286} /qn
REM Apple Mobile Device Support silent uninstall
MsiExec /x {5FA8C4BE-8C74-4B9C-9B49-EBF759230189} /qn
REM Apple Application Support (32-bit) silent uninstall
MsiExec /x {5A659BE5-849B-484E-A83B-DCB78407F3A4} /qn
REM Apple Software Update silent uninstall
MsiExec /x {A30EA700-5515-48F0-88B0-9E99DC356B88} /qn
Echo Done
Comments
Post a Comment