Fix incorrect --ref
Detect Windows 11 edition name
Add fix for Server Core editions
Add support for virtual editions CloudEdition, CloudEditionN
This commit is contained in:
abbodi1406 2021-10-10 03:53:49 +03:00
parent 0fe85aa08a
commit e49ca44015
2 changed files with 315 additions and 52 deletions

View File

@ -1,5 +1,5 @@
#!/bin/bash
scriptName="UUP Converter v0.6.3"
scriptName="UUP Converter v0.6.5"
UUP_CONVERTER_SCRIPT=1
export PATH=${PATH}:/usr/sbin
@ -15,15 +15,18 @@ elif [ -f `dirname $0`/convert_config_macos ] && [ `uname` == "Darwin" ]; then
else
VIRTUAL_EDITIONS_LIST="CoreSingleLanguage Enterprise EnterpriseN Education \
EducationN ProfessionalEducation ProfessionalEducationN \
ProfessionalWorkstation ProfessionalWorkstationN ServerRdsh IoTEnterprise"
ProfessionalWorkstation ProfessionalWorkstationN ServerRdsh IoTEnterprise \
CloudEdition CloudEditionN"
fi
editions='analogonecore
andromeda
cloud
cloudn
cloude
clouden
cloudn
cloudedition
cloudeditionn
core
corecountryspecific
coren
@ -31,6 +34,10 @@ coresinglelanguage
coresystemserver
education
educationn
embedded
embeddede
embeddedeeval
embeddedeval
enterprise
enterpriseeval
enterpriseg
@ -42,9 +49,13 @@ enterpriseseval
enterprisesn
enterprisesneval
holographic
hubos
iotenterprise
iotenterprises
iotos
iotuap
lite
mobilecore
onecoreupdateos
ppipro
professional
@ -62,7 +73,6 @@ serverazurecorcore
serverazurenano
serverazurenanocore
serverazurestackhcicor
serverazurestackhcicorcore
servercloudstorage
servercloudstoragecore
serverdatacenter
@ -104,8 +114,6 @@ serverstorageworkgroupeval
serverstorageworkgroupevalcore
serverturbine
serverturbinecor
serverturbinecorcore
serverturbinecore
serverweb
serverwebcore
starter
@ -141,6 +149,7 @@ sources/bootsvc.dll
sources/cmisetup.dll
sources/compatctrl.dll
sources/compatprovider.dll
sources/compliance.ini
sources/cryptosetup.dll
sources/diager.dll
sources/diagnostic.dll
@ -197,6 +206,7 @@ sources/unattend.dll
sources/unbcl.dll
sources/upgloader.dll
sources/upgrade_frmwrk.xml
sources/utcapi.dll
sources/uxlib.dll
sources/uxlibres.dll
sources/vhdprovider.dll
@ -205,6 +215,7 @@ sources/w32uires.dll
sources/warning.gif
sources/wdsclient.dll
sources/wdsclientapi.dll
sources/wdscommonlib.dll
sources/wdscore.dll
sources/wdscsl.dll
sources/wdsimage.dll
@ -240,6 +251,7 @@ sources/..-.*/setup.exe.mui
sources/..-.*/setup_help_upgrade_or_custom.rtf
sources/..-.*/setupcompat.dll.mui
sources/..-.*/SetupCore.dll.mui
sources/..-.*/SetupMgr.dll.mui
sources/..-.*/setupplatform.exe.mui
sources/..-.*/SetupPrep.exe.mui
sources/..-.*/smiengine.dll.mui
@ -397,7 +409,7 @@ extractDir="$tempDir/extract"
echo -e "\033[1m$scriptName\033[0m"
updatesDetected=false
for file in `find "$uupDir" -type f -iname "windows10.0-kb*.cab"`; do
for file in `find "$uupDir" -type f -iname "windows10.0-kb*.cab" -or -iname "ssu-*.cab"`; do
updatesDetected=true
done
@ -411,7 +423,7 @@ if [ $runVirtualEditions -eq 1 ] && [ "$VIRTUAL_EDITIONS_PLUGIN_LOADED" != "1" ]
fi
reffiles=0
for file in `find "$uupDir" -type f -iname "*.cab" -not -iname "*windows10.0-kb*.cab"`; do
for file in `find "$uupDir" -type f -iname "*.cab" -not -iname "*windows10.0-kb*.cab" -not -iname "ssu-*.cab"`; do
fileName=`basename $file .cab`
echo -e "$infoColor""CAB -> ESD:""$resetColor"" $fileName"
@ -419,7 +431,9 @@ for file in `find "$uupDir" -type f -iname "*.cab" -not -iname "*windows10.0-kb*
cabextract -d "$extractDir" "$file" >/dev/null 2>/dev/null
errorHandler $? "Failed to extract $fileName.cab"
wimlib-imagex capture "$extractDir" "$tempDir/$fileName.esd" >/dev/null
wimlib-imagex capture "$extractDir" "$tempDir/$fileName.esd" \
--no-acls --norpfix "Edition Package" "Edition Package" >/dev/null
errorHandler $? "Failed to create $fileName.esd"
let reffiles++
@ -437,7 +451,7 @@ mkdir ISODIR
echo ""
echo -e "$infoColor""Creating ISO structure...""$resetColor"
wimlib-imagex apply "$firstMetadata" 1 ISODIR --no-acls 2>/dev/null
wimlib-imagex apply "$firstMetadata" 1 ISODIR --no-acls --no-attributes 2>/dev/null
errorHandler $? "Failed to create ISO structure"
echo ""
@ -474,8 +488,13 @@ y' | chntpw -e "$tempDir/SOFTWARE" >/dev/null
wimlib-imagex update ISODIR/sources/boot.wim 1 \
--command "add $tempDir/SOFTWARE /Windows/System32/config/SOFTWARE" >/dev/null
bckimg=background_cli.bmp
if [ -e ./ISODIR/sources/background_svr.bmp ]; then
bckimg=background_svr.bmp
fi
wimlib-imagex update ISODIR/sources/boot.wim 1 \
--command "add ISODIR/sources/background_cli.bmp /Windows/system32/winre.jpg" >/dev/null
--command "add ISODIR/sources/$bckimg /Windows/system32/winre.jpg" >/dev/null
wimlib-imagex update ISODIR/sources/boot.wim 1 \
--command "delete /Windows/System32/winpeshl.ini" >/dev/null
@ -502,8 +521,8 @@ list=
echo "delete /Windows/System32/winpeshl.ini" >"$tempDir/update.txt"
echo "add ISODIR/setup.exe /setup.exe" >>"$tempDir/update.txt"
echo "add ISODIR/sources/inf/setup.cfg /sources/inf/setup.cfg" >>"$tempDir/update.txt"
echo "add ISODIR/sources/background_cli.bmp /sources/background.bmp" >>"$tempDir/update.txt"
echo "add ISODIR/sources/background_cli.bmp /Windows/system32/winre.jpg" >>"$tempDir/update.txt"
echo "add ISODIR/sources/$bckimg /sources/background.bmp" >>"$tempDir/update.txt"
echo "add ISODIR/sources/$bckimg /Windows/system32/winre.jpg" >>"$tempDir/update.txt"
for i in $files; do
echo "add ISODIR/$i /$i" >>"$tempDir/update.txt"
done
@ -520,13 +539,29 @@ for metadata in $metadataFiles; do
currentInfo=`wimlib-imagex info "$metadata" 3`
currentEdition=`grep -i "^Edition ID:" <<< "$currentInfo" | sed "s/.* //g"`
currentName=`grep -i "^Name:" <<< "$currentInfo" | sed "s/.* //g"`
currentType=`grep -i "^Installation Type:" <<< "$currentInfo" | sed "s/.* //g"`
if [ "$currentType" == "Server Core" ] && [ "$currentEdition" == "ServerStandard" ]; then
currentEdition="ServerStandardCore"
fi
if [ "$currentType" == "Server Core" ] && [ "$currentEdition" == "ServerDatacenter" ]; then
currentEdition="ServerDatacenterCore"
fi
editionName="Windows 10 $currentEdition"
if echo $currentName | grep -ow "Windows 11" >/dev/null; then
editionName="Windows 11 $currentEdition"
fi
if echo $currentEdition | grep -i "^Server" >/dev/null; then
editionName="Windows Server 2022 $currentEdition"
fi
echo -e "$infoColor""Exporting $editionName to install.$type...""$resetColor"
if [ $reffiles -ge 1 ]; then
wimlib-imagex export "$metadata" 3 ISODIR/sources/install.$type \
"$editionName" $compressParam --ref="$uupDir/*.esd" --ref "$tempDir/*.esd"
"$editionName" $compressParam --ref="$uupDir/*.esd" --ref="$tempDir/*.esd"
else
wimlib-imagex export "$metadata" 3 ISODIR/sources/install.$type \
"$editionName" $compressParam --ref="$uupDir/*.esd"

View File

@ -1111,6 +1111,208 @@ VE_IOTENTERPRISE_CONTENTID='4b1412af-12ad-0bbd-177e-6f7579c8600f'
VE_IOTENTERPRISE_PRINT='1'
VE_IOTENTERPRISE_INSECURE='0'
#CloudEdition
VE_CLOUDEDITION_DP=':00000 A4 00 00 00 03 00 00 00 30 30 34 37 35 2D 38 30
:00010 30 30 30 2D 30 30 30 30 30 2D 41 41 38 39 39 00
:00020 96 12 00 00 5B 43 6F 5D 58 32 32 2D 35 33 38 34
:00030 37 00 00 00 96 12 00 00 00 00 E0 2F 4E 1C FB 11
:00040 24 1C 09 00 00 00 00 00 60 D8 86 60 7B 38 2C A6
:00050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:000A0 75 77 B4 71 '
VE_CLOUDEDITION_DP4=':00000 F8 04 00 00 04 00 00 00 35 00 35 00 30 00 34 00
:00010 31 00 2D 00 30 00 34 00 37 00 35 00 38 00 2D 00
:00020 30 00 30 00 30 00 2D 00 30 00 30 00 30 00 30 00
:00030 30 00 30 00 2D 00 30 00 30 00 2D 00 31 00 30 00
:00040 33 00 33 00 2D 00 31 00 39 00 30 00 34 00 32 00
:00050 2E 00 30 00 30 00 30 00 30 00 2D 00 31 00 31 00
:00060 36 00 32 00 30 00 32 00 31 00 00 00 00 00 00 00
:00070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00080 00 00 00 00 00 00 00 00 39 00 32 00 66 00 62 00
:00090 38 00 37 00 32 00 36 00 2D 00 39 00 32 00 61 00
:000A0 38 00 2D 00 34 00 66 00 66 00 63 00 2D 00 39 00
:000B0 34 00 63 00 65 00 2D 00 66 00 38 00 32 00 65 00
:000C0 30 00 37 00 34 00 34 00 34 00 36 00 35 00 33 00
:000D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:000E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00110 00 00 00 00 00 00 00 00 43 00 6C 00 6F 00 75 00
:00120 64 00 45 00 64 00 69 00 74 00 69 00 6F 00 6E 00
:00130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:001B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:001C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:001D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00270 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00280 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00290 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:002A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:002B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:002C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:002D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:002E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:002F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00310 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00320 00 00 00 00 00 00 00 00 96 12 00 00 00 00 E0 2F
:00330 4E 1C FB 11 24 1C 09 00 63 69 72 E5 F0 D6 3C 60
:00340 8B A9 3E 47 20 66 4C 38 58 B9 91 E1 CC 7A 27 77
:00350 80 E0 18 E8 25 B3 AE 1F 30 14 8C 66 F7 E5 B0 BE
:00360 F9 DC A0 12 F8 2B 09 3D 63 50 ED 21 B5 0A EB CA
:00370 55 A8 1C EC D4 7A D9 4F 5B 00 43 00 6F 00 5D 00
:00380 58 00 32 00 32 00 2D 00 35 00 33 00 38 00 34 00
:00390 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:003A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:003B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:003C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:003D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:003E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:003F0 00 00 00 00 00 00 00 00 52 00 65 00 74 00 61 00
:00400 69 00 6C 00 00 00 00 00 00 00 00 00 00 00 00 00
:00410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00460 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00470 00 00 00 00 00 00 00 00 52 00 65 00 74 00 61 00
:00480 69 00 6C 00 00 00 00 00 00 00 00 00 00 00 00 00
:00490 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:004A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:004B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:004C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:004D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:004E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:004F0 00 00 00 00 00 00 00 00 '
VE_CLOUDEDITION_PID='00475-80000-00000-AA899'
VE_CLOUDEDITION_EDITIONID='CloudEdition'
VE_CLOUDEDITION_PFN='Microsoft.Windows.203.X22-53847_8wekyb3d8bbwe'
VE_CLOUDEDITION_CONTENTID='cc260727-8d42-5c4c-3c2f-f093008dcd9a'
VE_CLOUDEDITION_PRINT='0'
VE_CLOUDEDITION_INSECURE='1'
#CloudEditionN
VE_CLOUDEDITIONN_DP=':00000 A4 00 00 00 03 00 00 00 30 30 34 37 36 2D 32 30
:00010 30 30 30 2D 30 30 30 30 30 2D 41 41 39 34 36 00
:00020 9A 12 00 00 5B 43 6F 5D 58 32 32 2D 35 33 38 38
:00030 34 00 00 00 9A 12 00 00 00 00 08 3F 35 E1 4B D1
:00040 E6 1C 09 00 00 00 00 00 DF D8 86 60 0A 6F 75 8A
:00050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:000A0 07 5C B3 74'
VE_CLOUDEDITIONN_DP4=':00000 F8 04 00 00 04 00 00 00 35 00 35 00 30 00 34 00
:00010 31 00 2D 00 30 00 34 00 37 00 36 00 32 00 2D 00
:00020 30 00 30 00 30 00 2D 00 30 00 30 00 30 00 30 00
:00030 30 00 30 00 2D 00 30 00 30 00 2D 00 31 00 30 00
:00040 33 00 33 00 2D 00 31 00 39 00 30 00 34 00 32 00
:00050 2E 00 30 00 30 00 30 00 30 00 2D 00 31 00 31 00
:00060 36 00 32 00 30 00 32 00 31 00 00 00 00 00 00 00
:00070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00080 00 00 00 00 00 00 00 00 64 00 34 00 62 00 64 00
:00090 63 00 36 00 37 00 38 00 2D 00 30 00 61 00 34 00
:000A0 62 00 2D 00 34 00 61 00 33 00 32 00 2D 00 61 00
:000B0 35 00 62 00 33 00 2D 00 61 00 61 00 61 00 32 00
:000C0 34 00 63 00 33 00 62 00 30 00 66 00 32 00 34 00
:000D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:000E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00110 00 00 00 00 00 00 00 00 43 00 6C 00 6F 00 75 00
:00120 64 00 45 00 64 00 69 00 74 00 69 00 6F 00 6E 00
:00130 4E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:001B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:001C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:001D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00270 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00280 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00290 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:002A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:002B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:002C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:002D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:002E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:002F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00310 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00320 00 00 00 00 00 00 00 00 9A 12 00 00 00 00 08 3F
:00330 35 E1 4B D1 E6 1C 09 00 FF C3 8A 76 E8 92 BD 57
:00340 EA DF AD E6 E9 36 A5 5C E1 50 99 31 73 EE 18 B0
:00350 32 CE 8E 37 56 92 B1 6E 46 BE 16 AE CC 3D AE ED
:00360 B0 18 82 E3 74 A0 EF F0 DA 53 37 24 3C ED 35 3B
:00370 56 2C 33 7E 86 4D CC EA 5B 00 43 00 6F 00 5D 00
:00380 58 00 32 00 32 00 2D 00 35 00 33 00 38 00 38 00
:00390 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:003A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:003B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:003C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:003D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:003E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:003F0 00 00 00 00 00 00 00 00 52 00 65 00 74 00 61 00
:00400 69 00 6C 00 00 00 00 00 00 00 00 00 00 00 00 00
:00410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00460 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:00470 00 00 00 00 00 00 00 00 52 00 65 00 74 00 61 00
:00480 69 00 6C 00 00 00 00 00 00 00 00 00 00 00 00 00
:00490 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:004A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:004B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:004C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:004D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:004E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
:004F0 00 00 00 00 00 00 00 00'
VE_CLOUDEDITIONN_PID='00476-20000-00000-AA946'
VE_CLOUDEDITIONN_EDITIONID='CloudEditionN'
VE_CLOUDEDITIONN_PFN='Microsoft.Windows.202.X22-53884_8wekyb3d8bbwe'
VE_CLOUDEDITIONN_CONTENTID='c7cfb460-bc9b-b32a-69b3-acf52bd6fa48'
VE_CLOUDEDITIONN_PRINT='0'
VE_CLOUDEDITIONN_INSECURE='1'
function generateChntpwScript() {
echo "cd \Microsoft\Windows NT\CurrentVersion
nv 3 DigitalProductId
@ -1248,6 +1450,23 @@ function getChntpwScript() {
"$VE_PROFESSIONALWORKSTATIONN_PRINT" \
"$VE_PROFESSIONALWORKSTATIONN_INSECURE"
return 0
elif [ "$1" == "CloudEdition" ]; then
generateChntpwScript "$VE_CLOUDEDITION_DP" \
"$VE_CLOUDEDITION_DP4" \ "$VE_CLOUDEDITION_PID" \
"$VE_CLOUDEDITION_EDITIONID" "$VE_CLOUDEDITION_PFN" \
"$VE_CLOUDEDITION_CONTENTID" "$VE_CLOUDEDITION_PRINT" \
"$VE_CLOUDEDITION_INSECURE"
return 0
elif [ "$1" == "CloudEditionN" ]; then
generateChntpwScript "$VE_CLOUDEDITIONN_DP" \
"$VE_CLOUDEDITIONN_DP4" "$VE_CLOUDEDITIONN_PID" \
"$VE_CLOUDEDITIONN_EDITIONID" "$VE_CLOUDEDITIONN_PFN" \
"$VE_CLOUDEDITIONN_CONTENTID" \
"$VE_CLOUDEDITIONN_PRINT" \
"$VE_CLOUDEDITIONN_INSECURE"
return 0
elif [ "$1" == "CoreSingleLanguage" ]; then
generateChntpwScript "$VE_CORESINGLELANGUAGE_DP" \
@ -1312,51 +1531,27 @@ function createVirtualEdition() {
edition="$1"
minBuild=17063
if [ "$edition" == "Enterprise" ]; then
if [ "$edition" == "Enterprise" -o "$edition" == "Education" -o "$edition" == "ProfessionalEducation" -o "$edition" == "ProfessionalWorkstation" -o "$edition" == "ServerRdsh" ]; then
supported=1
requiredEdition="Professional"
description="Windows 10 Enterprise"
elif [ "$edition" == "EnterpriseN" ]; then
elif [ "$edition" == "EnterpriseN" -o "$edition" == "EducationN" -o "$edition" == "ProfessionalEducationN" -o "$edition" == "ProfessionalWorkstationN" ]; then
supported=1
requiredEdition="ProfessionalN"
description="Windows 10 Enterprise N"
elif [ "$edition" == "Education" ]; then
supported=1
requiredEdition="Professional"
description="Windows 10 Education"
elif [ "$edition" == "EducationN" ]; then
supported=1
requiredEdition="ProfessionalN"
description="Windows 10 Education N"
elif [ "$edition" == "ProfessionalEducation" ]; then
supported=1
requiredEdition="Professional"
description="Windows 10 Pro Education"
elif [ "$edition" == "ProfessionalEducationN" ]; then
supported=1
requiredEdition="ProfessionalN"
description="Windows 10 Pro Education N"
elif [ "$edition" == "ProfessionalWorkstation" ]; then
supported=1
requiredEdition="Professional"
description="Windows 10 Pro for Workstations"
elif [ "$edition" == "ProfessionalWorkstationN" ]; then
supported=1
requiredEdition="ProfessionalN"
description="Windows 10 Pro for Workstations N"
elif [ "$edition" == "CoreSingleLanguage" ]; then
supported=1
requiredEdition="Core"
description="Windows 10 Home Single Language"
elif [ "$edition" == "ServerRdsh" ]; then
supported=1
requiredEdition="Professional"
description="Windows 10 Enterprise for Virtual Desktops"
elif [ "$edition" == "IoTEnterprise" ]; then
supported=1
requiredEdition="Professional"
description="Windows 10 IoT Enterprise"
minBuild=18277
elif [ "$edition" == "CloudEdition" ]; then
supported=1
requiredEdition="Professional"
minBuild=21364
elif [ "$edition" == "CloudEditionN" ]; then
supported=1
requiredEdition="ProfessionalN"
minBuild=21364
elif [ "$edition" == "CoreSingleLanguage" ]; then
supported=1
requiredEdition="Core"
fi
if [ $supported != 1 ]; then
@ -1384,7 +1579,40 @@ function createVirtualEdition() {
return 2
fi
newName="Windows 10 $edition"
winName="Windows 10"
if [ $build -ge 21990 ]; then
winName="Windows 11"
fi
if [ "$edition" == "Enterprise" ]; then
description="$winName Enterprise"
elif [ "$edition" == "EnterpriseN" ]; then
description="$winName Enterprise N"
elif [ "$edition" == "Education" ]; then
description="$winName Education"
elif [ "$edition" == "EducationN" ]; then
description="$winName Education N"
elif [ "$edition" == "ProfessionalEducation" ]; then
description="$winName Pro Education"
elif [ "$edition" == "ProfessionalEducationN" ]; then
description="$winName Pro Education N"
elif [ "$edition" == "ProfessionalWorkstation" ]; then
description="$winName Pro for Workstations"
elif [ "$edition" == "ProfessionalWorkstationN" ]; then
description="$winName Pro for Workstations N"
elif [ "$edition" == "CloudEdition" ]; then
description="$winName SE"
elif [ "$edition" == "CloudEditionN" ]; then
description="$winName SE N"
elif [ "$edition" == "CoreSingleLanguage" ]; then
description="$winName Home Single Language"
elif [ "$edition" == "ServerRdsh" ]; then
description="$winName Enterprise multi-session"
elif [ "$edition" == "IoTEnterprise" ]; then
description="$winName IoT Enterprise"
fi
newName="$winName $edition"
tmpDir=`mktemp -d`
wimlib-imagex export ISODIR/sources/install.$type $sourceIndex \