Drivers and Killer Drivers

* Add-WindowsDriver section to include extra drivers in WinPE
* Added Killer Network Driver to the download list
* Bugfix: $Drivers was not set properly
This commit is contained in:
Alan Mason 2017-11-28 17:48:52 -08:00
parent 7a58e6e859
commit 3e63a50f92

View file

@ -158,7 +158,6 @@ if ($MyInvocation.InvocationName -ne ".") {
if (Ask-User "Update Tools?") {
$DownloadErrors = 0
$Path = $Temp
## Download Tools ##
$ToolSources = @(
@ -176,6 +175,11 @@ if ($MyInvocation.InvocationName -ne ".") {
# HWiNFO
@("hwinfo64.zip", "http://app.oldfoss.com:81/download/HWiNFO/hw64_560.zip"),
@("hwinfo32.zip", "http://app.oldfoss.com:81/download/HWiNFO/hw32_560.zip"),
# Killer Network Drivers
@(
"killerinf.zip",
("http://www.killernetworking.com"+(FindDynamicUrl "http://www.killernetworking.com/driver-downloads/item/killer-drivers-inf" "Download Killer-Ethernet").replace('&', '&'))
),
# Notepad++
@("npp_amd64.7z", "https://notepad-plus-plus.org/repository/7.x/7.5.2/npp.7.5.2.bin.minimalist.x64.7z"),
@("npp_x86.7z", "https://notepad-plus-plus.org/repository/7.x/7.5.2/npp.7.5.2.bin.minimalist.7z"),
@ -299,6 +303,25 @@ if ($MyInvocation.InvocationName -ne ".") {
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
}
# Killer Network Driver
Write-Host "Extracting: Killer Network Driver"
try {
$ArgumentList = @(
"e", "$Temp\killerinf.zip", "-o$Root\Drivers\amd64\Killer",
"-aoa", "-bso0", "-bse0", "-bsp0",
"Production\Windows10-x64\Eth\*")
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
$ArgumentList = @(
"e", "$Temp\killerinf.zip", "-o$Root\Drivers\x86\Killer",
"-aoa", "-bso0", "-bse0", "-bsp0",
"Production\Windows10-x86\Eth\*")
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
Remove-Item "$Temp\killerinf*"
}
catch {
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
}
# HWiNFO
Write-Host "Extracting: HWiNFO"
try {
@ -467,9 +490,9 @@ if ($MyInvocation.InvocationName -ne ".") {
## Build ##
foreach ($Arch in @("amd64", "x86")) {
$Drivers = "$Root\Drivers\%arch"
$Drivers = "$Root\Drivers\$Arch"
$Mount = "$Root\Mount"
$PEFiles = "$Root\PEFiles\$arch"
$PEFiles = "$Root\PEFiles\$Arch"
# Copy WinPE files
Write-Host "Copying files..."
@ -490,6 +513,9 @@ if ($MyInvocation.InvocationName -ne ".") {
New-Item -Path $Mount -ItemType "directory" -Force | Out-Null
Mount-WindowsImage -Path $Mount -ImagePath "$PEFiles\media\sources\boot.wim" -Index 1 | Out-Null
# Add drivers
Add-WindowsDriver -Path $Mount -Driver $Drivers -Recurse | Out-Null
# Add packages
Write-Host "Adding packages:"
foreach ($Package in $WinPEPackages) {