builder_0.1_.ps1 aktualisiert
This commit is contained in:
parent
e9d74443ff
commit
7baa848965
@ -9,7 +9,7 @@ $droot = "C:\win11_slipstream"
|
|||||||
$isoFile = "${droot}\Win11_24H2_German_x64.iso"
|
$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"
|
$workPath = "${droot}\mount\work"
|
||||||
$toolPath = "${droot}\tools"
|
$toolPath = "${droot}\tools"
|
||||||
@ -31,7 +31,7 @@ function CreateDirs {
|
|||||||
New-Item -ItemType Directory -Force -Path "${droot}\drivers\install" > $null
|
New-Item -ItemType Directory -Force -Path "${droot}\drivers\install" > $null
|
||||||
}
|
}
|
||||||
function DiscardMounts {
|
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\boot /Discard
|
||||||
DISM /Unmount-Wim /MountDir:${droot}\mount\install /Discard
|
DISM /Unmount-Wim /MountDir:${droot}\mount\install /Discard
|
||||||
}
|
}
|
||||||
@ -53,7 +53,7 @@ function CopyIso {
|
|||||||
cp ${driveLetter}:\sources\boot.wim ${wimPath}
|
cp ${driveLetter}:\sources\boot.wim ${wimPath}
|
||||||
attrib -R ${wimPath}\boot.wim
|
attrib -R ${wimPath}\boot.wim
|
||||||
} else {
|
} 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"))
|
if(-not(Test-Path "${wimPath}\install.wim"))
|
||||||
{
|
{
|
||||||
@ -61,7 +61,7 @@ function CopyIso {
|
|||||||
cp ${driveLetter}:\sources\install.wim ${wimPath}
|
cp ${driveLetter}:\sources\install.wim ${wimPath}
|
||||||
attrib -R ${wimPath}\install.wim
|
attrib -R ${wimPath}\install.wim
|
||||||
} else {
|
} 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."
|
Write-Host "Kopieren abgeschlossen."
|
||||||
@ -78,9 +78,9 @@ function ConvertEsd {
|
|||||||
attrib -R ${droot}\install.wim
|
attrib -R ${droot}\install.wim
|
||||||
}
|
}
|
||||||
function ModifiyBoot {
|
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 "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 /get-wiminfo /wimfile:${wimPath}\boot.wim
|
||||||
DISM /Mount-Wim /WimFile:${wimPath}\boot.wim /Index:1 /MountDir:${droot}\mount\boot
|
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 /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
|
DISM /Unmount-Wim /MountDir:${droot}\mount\boot /Commit
|
||||||
}
|
}
|
||||||
function ModifyInstall {
|
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 "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 /get-wiminfo /wimfile:${addFiles}\Sources\install.wim
|
||||||
DISM /Mount-Wim /WimFile:${addFiles}\Sources\install.wim /Index:1 /MountDir:${droot}\mount\install
|
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-Driver /Driver:${droot}\drivers\install /recurse /forceunsigned
|
||||||
@ -103,15 +103,15 @@ function CreateISO {
|
|||||||
Write-Host " kopiere originale ISO Dateien ..."
|
Write-Host " kopiere originale ISO Dateien ..."
|
||||||
cp ${isoPath}\* ${workPath} -Recurse -Force
|
cp ${isoPath}\* ${workPath} -Recurse -Force
|
||||||
|
|
||||||
Write-Host " kopiere zusäzliche Dateien ..."
|
Write-Host " kopiere zusäzliche Dateien ..."
|
||||||
cp ${addFiles}\* ${workPath} -Recurse -Force
|
cp ${addFiles}\* ${workPath} -Recurse -Force
|
||||||
|
|
||||||
Write-Host "Erstelle bootable.iso ..."
|
Write-Host "Erstelle bootable.iso ..."
|
||||||
# $toolPath\oscdimg.exe -b"${toolPath}\efisys.bin" -udfver102 -u2 -h -m -o ${workPath} ${droot}\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 {
|
function CleanUp {
|
||||||
Write-Host "Räume auf..."
|
Write-Host "Räume auf..."
|
||||||
# HKLM\SOFTWARE\Microsoft\WIMMount\mounted images\
|
# HKLM\SOFTWARE\Microsoft\WIMMount\mounted images\
|
||||||
DISM /Cleanup-Wim
|
DISM /Cleanup-Wim
|
||||||
DISM /Get-MountedImageInfo
|
DISM /Get-MountedImageInfo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user