#!/bin/bash # Colors green='\033[0;32m' yellow='\033[1;33m' Red='\033[0;31m' ENDCOLOR="\e[0m" # Define download URLs ventoy_url="https://yer.dl.sourceforge.net/project/ventoy/v1.0.99/ventoy-1.0.99-linux.tar.gz?viasf=1" windows10_iso_url="https://dn721103.ca.archive.org/0/items/en-us_windows_10_consumer_editions_version_22h2_updated_feb_2023_x64_dvd_c29e4bb3/en-us_windows_10_consumer_editions_version_22h2_updated_feb_2023_x64_dvd_c29e4bb3.iso" # Check if wget is installed if ! command -v wget &> /dev/null; then echo "${Red}[*] Error: wget is not installed. Please install wget and try again.${ENDCOLOR}" exit 1 fi # Get the first USB drive path usb_drive="/dev/sdb" # Replace X with your actual USB drive letter # Check if USB drive is present if [ ! -b "$usb_drive" ]; then echo "${Red}[*] Error: No USB drive found at $usb_drive.${ENDCOLOR}" exit 1 fi # Download Ventoy echo -e "${green}[*] Downloading Ventoy...${ENDCOLOR}" wget -O ventoy.tar.gz "$ventoy_url" # Extract Ventoy echo -e "${green}[*] Extracting Ventoy...${ENDCOLOR}" tar -xf ventoy.tar.gz # Warn user about data loss echo -e "${yellow}WARNING: Ventoy installation will erase all data on the USB drive!${ENDCOLOR}" echo "Press Enter to continue or Ctrl+C to abort." read -r # Install Ventoy (replace with ventoy2disk.sh if needed for your specific version) echo -e "${green}[*] Installing Ventoy...${ENDCOLOR}" sudo ./ventoy2Disk.sh -i "$usb_drive" # Download Windows 10 ISO echo -e "${green}[*] Downloading Windows 10 ISO...${ENDCOLOR}" wget -O WIN10_x64.iso "$windows10_iso_url" # Move Windows 10 ISO to USB drive echo -e "${green}[*] Moving Windows 10 ISO to USB drive...${ENDCOLOR}" sudo mv WIN10_x64.iso /media/ventoy/ # Clean Up echo -e "${green}[*] Cleaning Up...${ENDCOLOR}" rm -rf ventoy.tar.gz ventoy echo -e "${green}[*] Done creating your windows installation media Sucsessfully. ${ENDCOLOR}"