Added iTunes autom. download + fixed admin. check
The title pretty much says it all! Everything should now be automated and working. Also fixes https://github.com/NelloKudo/Apple-Mobile-Drivers-Installer/issues/1!
This commit is contained in:
+11
-3
@@ -6,13 +6,14 @@
|
|||||||
|
|
||||||
$AppleDri1 = "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2020/11/01d96dfd-2f6f-46f7-8bc3-fd82088996d2_a31ff7000e504855b3fa124bf27b3fe5bc4d0893.cab"
|
$AppleDri1 = "https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2020/11/01d96dfd-2f6f-46f7-8bc3-fd82088996d2_a31ff7000e504855b3fa124bf27b3fe5bc4d0893.cab"
|
||||||
$AppleDri2 = "https://catalog.s.download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/11/netaapl_7503681835e08ce761c52858949731761e1fa5a1.cab"
|
$AppleDri2 = "https://catalog.s.download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/11/netaapl_7503681835e08ce761c52858949731761e1fa5a1.cab"
|
||||||
|
$AppleITunesLink = "https://www.apple.com/itunes/download/win64"
|
||||||
|
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
Write-Host -ForegroundColor Cyan "Welcome to Apple USB and Mobile Device Ethernet drivers installer!!"
|
Write-Host -ForegroundColor Cyan "Welcome to Apple USB and Mobile Device Ethernet drivers installer!!"
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|
||||||
## Checking if the script is being run as admin..
|
## Checking if the script is being run as admin..
|
||||||
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole('Administrators')) {
|
if (-not ([Security.Principal.WindowsIdentity]::GetCurrent().Groups -contains 'S-1-5-32-544')) {
|
||||||
Write-Host -ForegroundColor Yellow "This script requires administrative privileges!"
|
Write-Host -ForegroundColor Yellow "This script requires administrative privileges!"
|
||||||
Write-Host -ForegroundColor Yellow "Please run the script as an administrator if you want to install drivers."
|
Write-Host -ForegroundColor Yellow "Please run the script as an administrator if you want to install drivers."
|
||||||
pause
|
pause
|
||||||
@@ -25,9 +26,16 @@ if (-not (Test-Path $destinationFolder)) {
|
|||||||
New-Item -ItemType Directory -Path $destinationFolder | Out-Null
|
New-Item -ItemType Directory -Path $destinationFolder | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
## Downloading and extracting drivers..
|
$currentPath = $PWD.Path
|
||||||
|
Write-Host -ForegroundColor Yellow "Downloading Apple iTunes and installing AppleMobileDeviceSupport64.msi.."
|
||||||
|
Write-Host -ForegroundColor Yellow "(It might take a while! Script is not frozen!)"
|
||||||
|
(New-Object System.Net.WebClient).DownloadFile($AppleITunesLink, [System.IO.Path]::Combine($destinationFolder, "iTunes64Setup.exe"))
|
||||||
|
cd "$destinationFolder"
|
||||||
|
Start-Process -FilePath "$destinationFolder\iTunes64Setup.exe" -ArgumentList "/extract" -Wait
|
||||||
|
cd "$currentPath"
|
||||||
|
Start-Process -FilePath "$destinationFolder\AppleMobileDeviceSupport64.msi" -ArgumentList "/qn" -Wait
|
||||||
|
|
||||||
Write-Host -ForegroundColor Yellow "Downloading Apple USB and Mobile Device Ethernet drivers from Microsoft..."
|
Write-Host -ForegroundColor Yellow "Downloading Apple USB and Mobile Device Ethernet drivers from Microsoft..."
|
||||||
Invoke-WebRequest -Uri $AppleDri1 -OutFile ([System.IO.Path]::Combine($destinationFolder, "AppleUSB-486.0.0.0-driv.cab"))
|
Invoke-WebRequest -Uri $AppleDri1 -OutFile ([System.IO.Path]::Combine($destinationFolder, "AppleUSB-486.0.0.0-driv.cab"))
|
||||||
Invoke-WebRequest -Uri $AppleDri2 -OutFile ([System.IO.Path]::Combine($destinationFolder, "AppleNet-1.8.5.1-driv.cab"))
|
Invoke-WebRequest -Uri $AppleDri2 -OutFile ([System.IO.Path]::Combine($destinationFolder, "AppleNet-1.8.5.1-driv.cab"))
|
||||||
|
|||||||
@@ -7,8 +7,6 @@
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
## Download / Installation
|
## Download / Installation
|
||||||
- Download **iTunes** from [here](https://www.apple.com/itunes/download/win64)
|
|
||||||
- Extract it (using WinRAR/7zip) and install **AppleMobileDeviceSupport64.msi**
|
|
||||||
- Open **PowerShell** (or Windows Terminal with PowerShell) as administrator.
|
- Open **PowerShell** (or Windows Terminal with PowerShell) as administrator.
|
||||||
- Paste the following and press enter:
|
- Paste the following and press enter:
|
||||||
|
|
||||||
@@ -28,10 +26,10 @@ by default, making their installation a burden for every Apple user which needs
|
|||||||
Since Googling doesn't help with the issue, as all forum posts return strange ways to download such drivers (with most of those being super-outdated)
|
Since Googling doesn't help with the issue, as all forum posts return strange ways to download such drivers (with most of those being super-outdated)
|
||||||
I just went for the easy way: a script that installs the **same drivers Windows Update would**, but in an extremely faster way.
|
I just went for the easy way: a script that installs the **same drivers Windows Update would**, but in an extremely faster way.
|
||||||
|
|
||||||
Downloading iTunes is still needed though, as I can't probably just upload Apple's programs like nothing xd
|
|
||||||
|
|
||||||
This'd make life easier for everyone who'd just want to use their phone as hotspot *and not install every hunch of Apple software just to have some internet*.
|
This'd make life easier for everyone who'd just want to use their phone as hotspot *and not install every hunch of Apple software just to have some internet*.
|
||||||
|
|
||||||
|
Making the script download iTunes and use its MobileSupport .msi file is still needed though, as I can't probably just upload Apple's programs like nothing... xd
|
||||||
|
|
||||||
The script pulls drivers from [Microsoft's Update Catalog](https://www.catalog.update.microsoft.com/Home.aspx), which you can pretty much browse yourself to look for Apple's stuff.
|
The script pulls drivers from [Microsoft's Update Catalog](https://www.catalog.update.microsoft.com/Home.aspx), which you can pretty much browse yourself to look for Apple's stuff.
|
||||||
It just installs the **right ones** from that catalog for them to actually work out of the box on Windows.
|
It just installs the **right ones** from that catalog for them to actually work out of the box on Windows.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user