to anyone who wants to burn windows iso's to a single layer dvd but can't because it's a bit too big, i made a bash script to repack a windows iso with recompressed .wim's
windows isn't my main os so it's not a cmd script, but it shouldn't be difficult to turn it into one
#!/bin/bash
workdir=$(mktemp -d)
rmworkdir() { rm -rf $workdir; }
trap rmworkdir SIGINT SIGTERM
7z x -o$workdir "$1"
wimoptimize --recompress --compress=lzx:100 $workdir/sources/boot.wim
wimoptimize --recompress --solid $workdir/sources/install.wim
mkisofs -no-emul-boot -b boot/etfsboot.com -boot-load-seg 0 -boot-load-size 8 -eltorito-alt-boot -no-emul-boot -b efi/microsoft/boot/efisys.bin -boot-load-size 1 -iso-level 4 -UDF -o "${1%.*}-compressed.${1#*.}" $workdir
rmworkdir
dependencies: p7zip (extraction), wimlib (recompression), mkisofs (iso creation)
tested with win10 iot ent. ltsc '21 64bit which comes out to 3.5GiB, and win11 iot ent. '24 64bit which comes out to 3.8GiB