Making a script with the settings for installing?

The first two links contains complete scripts - you just have to mogrify them to suit your use case.

Other places to get a hold on what to do an how to do it

There is no complete script for your specific purpose to consume …

Read the topics and the scripts - you can easily create something workable - even installing a complete desktop …