fixes...
This commit is contained in:
parent
28250542b8
commit
75021ab06f
@ -4,11 +4,11 @@
|
||||
|
||||
# Diese Variablen jeweils anpassen:
|
||||
# Installationspfad
|
||||
$droot = "C:\isobuilder"
|
||||
$droot = "F:\isobuilder"
|
||||
# Name und Ort der Qeull-ISO Datei
|
||||
$isoFile = "${droot}\Win11_24H2_German_x64.iso"
|
||||
$isoFile = "F:\public\Win11_24H2_German_x64.iso"
|
||||
# Name und Ort der neu zu erstellenden .ISO
|
||||
$isoOutfile = "c:\public\Win11_24H2_AE-Edition_x64.iso"
|
||||
$isoOutfile = "F:\public\Win11_24H2_AE-Edition_x64.iso"
|
||||
|
||||
# -------------------------------------------------------------------------------
|
||||
# Ab hier nichts mehr ändern, außer Du weisst was Du tust!
|
||||
@ -19,6 +19,7 @@ $isoPath = "${droot}\mount\ISO"
|
||||
$addFiles = "${droot}\addfiles"
|
||||
$wimPath = "${addFiles}\Sources"
|
||||
|
||||
$wimInstallIndex = 5
|
||||
|
||||
function CreateDirs {
|
||||
New-Item -ItemType Directory -Force -Path "${isoPath}" > $null
|
||||
@ -79,24 +80,30 @@ function ConvertEsd {
|
||||
dism /export-image /SourceImageFile:${droot}\install.esd /SourceIndex:5 /DestinationImageFile:${droot}\install.wim /Compress:max /CheckIntegrity
|
||||
attrib -R ${droot}\install.wim
|
||||
}
|
||||
function ModifiyBoot {
|
||||
function ModifyBoot {
|
||||
# füge Treiber in das boot.wim Image ein
|
||||
Write-Host "Mounte die boot.wim..."
|
||||
Write-Host "Füge die Treiber unterhalb von drivers\boot in die boot.wim ein..."
|
||||
#dism /get-wiminfo /wimfile:${wimPath}\boot.wim
|
||||
DISM /Mount-Wim /WimFile:${wimPath}\boot.wim /Index:1 /MountDir:${droot}\mount\boot
|
||||
DISM /Image:${droot}\mount\boot /Add-Driver /Driver:${droot}\drivers\boot /recurse /forceunsigned
|
||||
#dism /get-wiminfo /wimfile:${wimPath}\boot.wim
|
||||
DISM /Mount-Wim /WimFile:${wimPath}\boot.wim /Index:2 /MountDir:${droot}\mount\boot
|
||||
DISM /Image:${droot}\mount\boot /Add-Driver /Driver:${droot}\drivers\boot /recurse /forceunsigned
|
||||
Write-Host "Trenne boot.wim..."
|
||||
DISM /Unmount-Wim /MountDir:${droot}\mount\boot /Commit
|
||||
DISM /Unmount-Wim /MountDir:${droot}\mount\boot /Commit
|
||||
}
|
||||
function ModifyInstall {
|
||||
# füge Treiber und Updates in das install.wim Image ein
|
||||
Write-Host "Extrahiere Index: ${wimINstallIndex} nach install.wim..."
|
||||
# Zeige die Enthaltenen Windows Editionen
|
||||
#dism /get-wiminfo /wimfile:${addFiles}\Sources\install.wim
|
||||
# Extrahiere Edition Windows 11 Pro (Index: 5)
|
||||
# DISM /Export-Image /SourceImageFile:"${isoPath}\Sources\install.wim" /SourceIndex:${wimInstallIndex} /DestinationImageFile:"${addFiles}\Sources\install.wim"
|
||||
Write-Host "Mounte die install.wim..."
|
||||
Write-Host "Füge die Treiber unterhalb von drivers\install in die install.wim ein..."
|
||||
#dism /get-wiminfo /wimfile:${addFiles}\Sources\install.wim
|
||||
DISM /Mount-Wim /WimFile:${addFiles}\Sources\install.wim /Index:1 /MountDir:${droot}\mount\install
|
||||
DISM /Image:${droot}\mount\install /Add-Driver /Driver:${droot}\drivers\install /recurse /forceunsigned
|
||||
DISM /Image:${droot}\mount\install /add-package /PackagePath:${droot}\addfiles\updates
|
||||
Write-Host " Füge die Treiber unterhalb von drivers\install in die install.wim ein..."
|
||||
# Mounte Extrahiertes Image
|
||||
DISM /Mount-Wim /WimFile:${addFiles}\Sources\install.wim /Index:${wimInstallIndex} /MountDir:${droot}\mount\install
|
||||
# Arbeite Treiber & Updates ein
|
||||
DISM /Image:${droot}\mount\install /Add-Driver /Driver:${droot}\drivers\install /recurse /forceunsigned
|
||||
DISM /Image:${droot}\mount\install /add-package /PackagePath:${droot}\addfiles\updates
|
||||
Write-Host "Trenne install.wim..."
|
||||
DISM /Unmount-Wim /MountDir:${droot}\mount\install /Commit
|
||||
}
|
||||
@ -113,8 +120,10 @@ function CreateISO {
|
||||
cp ${addFiles}\* ${workPath} -Recurse -Force
|
||||
|
||||
Write-Host "Erstelle ${isoOutfile} ..."
|
||||
# $toolPath\oscdimg.exe -b"${toolPath}\efisys.bin" -udfver102 -u2 -h -m -o ${workPath} ${droot}\bootable.iso
|
||||
Start-Process -Filepath "$toolPath\oscdimg.exe" -ArgumentList "-b`"${toolPath}\efisys.bin`" -udfver102 -u2 -h -m -o ${workPath} ${isoOutfile}" -Wait -WindowStyle Minimized
|
||||
# use bootfile provided by oscdimg
|
||||
Start-Process -Filepath "$toolPath\oscdimg.exe" -ArgumentList "-b`"${toolPath}\efisys.bin`" -udfver102 -u2 -h -m -o ${workPath} ${isoOutfile}" -Wait -WindowStyle Minimized
|
||||
# use bootfile from ISO
|
||||
Start-Process -Filepath "$toolPath\oscdimg.exe" -ArgumentList "-b`"${isoPath}\efi\microsoft\boot\efisys.bin`" -udfver102 -u2 -h -m -o ${workPath} ${isoOutfile}" -Wait -WindowStyle Minimized
|
||||
}
|
||||
function CleanUp {
|
||||
Write-Host "Räume auf..."
|
||||
@ -123,15 +132,20 @@ function CleanUp {
|
||||
DISM /Get-MountedImageInfo
|
||||
DISM /Get-MountedWimInfo
|
||||
}
|
||||
function CleanBuild {
|
||||
Write-Host "Räume auf..."
|
||||
Remove-Item -Path "${workPath}\*" -Force -Recurse
|
||||
Remove-Item -Path "${isoPath}\*" -Force -Recurse
|
||||
Remove-Item -Path "${wimPath}\*.wim" -Force
|
||||
}
|
||||
|
||||
<#
|
||||
function RunAll {
|
||||
CreateDirs
|
||||
DiscardMounts
|
||||
CopyIso
|
||||
ModifyBoot
|
||||
ModifyInstall
|
||||
CleanUp
|
||||
CreateISO
|
||||
}
|
||||
|
||||
DiscardMounts
|
||||
CreateDirs
|
||||
CopyIso
|
||||
ModifyBoot
|
||||
ModifyInstall
|
||||
CleanUp
|
||||
CreateISO
|
||||
|
||||
#>
|
||||
|
Loading…
x
Reference in New Issue
Block a user