Created
February 22, 2015 22:39
-
-
Save denblackstache/a8466c1521a054c9e69f to your computer and use it in GitHub Desktop.
iTunes Silent Installer | Without Bloatware
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set-ExecutionPolicy to RemoteSigned to start this script | |
# Checking out the 7z | |
if (-not (test-path "C:\Program Files\7-Zip\7z.exe")) {throw "C:\Program Files\7-Zip\7z.exe needed"} | |
set-alias sz "C:\Program Files\7-Zip\7z.exe" | |
$source = "./iTunes64Setup.exe" | |
$dest = "./iTunes64Setup" | |
# Unpack Bloatware | |
sz x -y $source "-o$dest" | |
# Install The iTunes main parts | |
cd $dest | |
Start-Process -FilePath msiexec -ArgumentList /i, AppleApplicationSupport.msi, /passive -Wait | |
Start-Process -FilePath msiexec -ArgumentList /i, AppleMobileDeviceSupport64.msi, /passive -Wait | |
Start-Process -FilePath msiexec -ArgumentList /i, iTunes64.msi, /passive -Wait | |
# Destruct | |
cd .. | |
Remove-Item $dest -Force -Recurse | |
Write-Host "Press any key to continue..." | |
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") | |
Write-Host |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment