Dateien nach "/" hochladen
This commit is contained in:
parent
7baa848965
commit
7ad5ed602b
@ -7,9 +7,11 @@
|
||||
$droot = "C:\win11_slipstream"
|
||||
# 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"
|
||||
@ -31,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
|
||||
}
|
||||
@ -53,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"))
|
||||
{
|
||||
@ -61,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."
|
||||
@ -78,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
|
||||
@ -88,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
|
||||
@ -100,18 +102,22 @@ function ModifyInstall {
|
||||
}
|
||||
function CreateISO {
|
||||
Write-Host "Erstelle neues Windows-Image ..."
|
||||
|
||||
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 bootable.iso ..."
|
||||
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} ${droot}\bootable.iso"
|
||||
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