builder_0.1_.ps1 aktualisiert

This commit is contained in:
Peter Reichart 2024-12-04 10:16:26 +00:00
parent e9d74443ff
commit 7baa848965

View File

@ -9,7 +9,7 @@ $droot = "C:\win11_slipstream"
$isoFile = "${droot}\Win11_24H2_German_x64.iso"
# -------------------------------------------------------------------------------
# Ab hier nichts mehr ändern, außer Du weisst was Du tust!
# Ab hier nichts mehr ändern, außer Du weisst was Du tust!
# -------------------------------------------------------------------------------
$workPath = "${droot}\mount\work"
$toolPath = "${droot}\tools"
@ -31,7 +31,7 @@ function CreateDirs {
New-Item -ItemType Directory -Force -Path "${droot}\drivers\install" > $null
}
function DiscardMounts {
Write-Host "Lösche eventuelle Mounts"
Write-Host "Lösche eventuelle Mounts"
DISM /Unmount-Wim /MountDir:${droot}\mount\boot /Discard
DISM /Unmount-Wim /MountDir:${droot}\mount\install /Discard
}
@ -53,7 +53,7 @@ function CopyIso {
cp ${driveLetter}:\sources\boot.wim ${wimPath}
attrib -R ${wimPath}\boot.wim
} else {
Write-Host "boot.wim ist bereits vorhanden und wird übersprungen."
Write-Host "boot.wim ist bereits vorhanden und wird übersprungen."
}
if(-not(Test-Path "${wimPath}\install.wim"))
{
@ -61,7 +61,7 @@ function CopyIso {
cp ${driveLetter}:\sources\install.wim ${wimPath}
attrib -R ${wimPath}\install.wim
} else {
Write-Host "install.wim ist bereits vorhanden und wird übersprungen."
Write-Host "install.wim ist bereits vorhanden und wird übersprungen."
}
Write-Host "Kopieren abgeschlossen."
@ -78,9 +78,9 @@ function ConvertEsd {
attrib -R ${droot}\install.wim
}
function ModifiyBoot {
# füge Treiber in das boot.wim Image ein
# 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..."
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
@ -88,9 +88,9 @@ function ModifiyBoot {
DISM /Unmount-Wim /MountDir:${droot}\mount\boot /Commit
}
function ModifyInstall {
# füge Treiber und Updates in das install.wim Image ein
# füge Treiber und Updates in das install.wim Image ein
Write-Host "Mounte die install.wim..."
Write-Host "Füge die Treiber unterhalb von drivers\install in die install.wim ein..."
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
@ -103,15 +103,15 @@ function CreateISO {
Write-Host " kopiere originale ISO Dateien ..."
cp ${isoPath}\* ${workPath} -Recurse -Force
Write-Host " kopiere zusäzliche Dateien ..."
Write-Host " kopiere zusäzliche Dateien ..."
cp ${addFiles}\* ${workPath} -Recurse -Force
Write-Host "Erstelle bootable.iso ..."
# $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} ${droot}\bootable.isoLossBeNing"
Start-Process -Filepath "$toolPath\oscdimg.exe" -ArgumentList "-b`"${toolPath}\efisys.bin`" -udfver102 -u2 -h -m -o ${workPath} ${droot}\bootable.iso"
}
function CleanUp {
Write-Host "Räume auf..."
Write-Host "Räume auf..."
# HKLM\SOFTWARE\Microsoft\WIMMount\mounted images\
DISM /Cleanup-Wim
DISM /Get-MountedImageInfo