diff --git a/quickget b/quickget index c5beeeb2c6..67987cff41 100755 --- a/quickget +++ b/quickget @@ -3333,18 +3333,16 @@ function create_config() { *windows-server*|*eval_oemret_x*|*eval_x*) CUSTOM_OS="windows-server";; *windows*|win*) CUSTOM_OS="windows" - while [ $# -gt 2 ]; do - case "${3}" in - -unattended|--unattended) - echo "Downloading VirtIO drivers..." - web_get "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso" "${VM_PATH}" - FIXED_ISO=${VM_PATH}/virtio-win.iso - - rm -f "${VM_PATH}/unattended.iso" - unattended_windows "${VM_PATH}" - shift - esac - done + # Older windows 10 ISOs use the year followed by the month rather than the year & half). Match any text for language. + if [ "${3}" != "--disable-unattended" ] && ( [ "${3}" == "--unattended" ] || grep -E -q 'Win(10|11)_([0-9]{2}H(1|2)|[0-9]{4})_[^.]*?(x64|x32)(v[0-9])?.iso' <<< "${INPUT}" ); then + echo "Creating unattended Windows installation files. To disable, pass --disable-unattended" + echo + echo "Downloading VirtIO drivers..." + web_get "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso" "${VM_PATH}" + FIXED_ISO=${VM_PATH}/virtio-win.iso + rm -f "${VM_PATH}/unattended.iso" + unattended_windows "${VM_PATH}" + fi ;; *) CUSTOM_OS="linux";; @@ -3397,7 +3395,7 @@ Arguments: --help : Show this help message ------------------------------------ Flags ------------------------------------- --create-config: - --unattended : Unattended windows installation + --disable-unattended : Force quickget not to set up an unattended installation -------------------------- For testing & development --------------------------- --url [os] [release] [edition] : Show image URL(s) --check [os] [release] [edition] : Check image URL(s)