builder_0.1_.ps1 aktualisiert
This commit is contained in:
parent
7ad5ed602b
commit
28250542b8
@ -4,14 +4,14 @@
|
||||
|
||||
# Diese Variablen jeweils anpassen:
|
||||
# Installationspfad
|
||||
$droot = "C:\win11_slipstream"
|
||||
$droot = "C:\isobuilder"
|
||||
# Name und Ort der Qeull-ISO Datei
|
||||
$isoFile = "${droot}\Win11_24H2_German_x64.iso"
|
||||
# Name und Ort der neu zu erstellenden .ISO
|
||||
$isoOutfile = "c:\public\Win11_24H2_AE-Edition_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"
|
||||
@ -33,7 +33,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
|
||||
}
|
||||
@ -55,7 +55,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"))
|
||||
{
|
||||
@ -63,7 +63,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."
|
||||
@ -80,9 +80,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
|
||||
@ -90,9 +90,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,13 +103,13 @@ function ModifyInstall {
|
||||
function CreateISO {
|
||||
Write-Host "Erstelle neues Windows-Image ..."
|
||||
|
||||
Write-Host " lösche Work-Verzeichnis ..."
|
||||
Write-Host " lösche Work-Verzeichnis ..."
|
||||
Remove-Item -Path "${workPath}\*" -Force -Recurse
|
||||
|
||||
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 ${isoOutfile} ..."
|
||||
@ -117,7 +117,7 @@ function CreateISO {
|
||||
Start-Process -Filepath "$toolPath\oscdimg.exe" -ArgumentList "-b`"${toolPath}\efisys.bin`" -udfver102 -u2 -h -m -o ${workPath} ${isoOutfile}" -Wait -WindowStyle Minimized
|
||||
}
|
||||
function CleanUp {
|
||||
Write-Host "Räume auf..."
|
||||
Write-Host "Räume auf..."
|
||||
# HKLM\SOFTWARE\Microsoft\WIMMount\mounted images\
|
||||
DISM /Cleanup-Wim
|
||||
DISM /Get-MountedImageInfo
|
||||
|
Loading…
x
Reference in New Issue
Block a user