feat: Allow product key configuration (#1110)

This commit is contained in:
Kroese 2025-03-13 12:55:36 +01:00 committed by GitHub
parent b465f78646
commit 5ab42e9409
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 42 additions and 59 deletions

View file

@ -681,6 +681,11 @@ updateXML() {
sed -i "s/SERVERSTANDARD<\/Value>/SERVER${EDITION^^}<\/Value>/g" "$asset"
fi
if [ -n "$KEY" ]; then
sed -i '/<ProductKey>/,/<\/ProductKey>/d' "$asset"
sed -i "s/<\/UserData>/ <ProductKey>\n <Key>${KEY}<\/Key>\n <WillShowUI>OnError<\/WillShowUI>\n <\/ProductKey>\n <\/UserData>/g" "$asset"
fi
return 0
}