T: cd Installers dir :SetImage @echo off set ImageName=0 echo Enter name of image to install set /p ImageName= if not exist %ImageName% goto SetImage :RestoreImage @echo on diskpart /s CreatePartitions.txt Dism /apply-image /imagefile:%ImageName% /index:1 /applydir:C:\ bcdboot C:\Windows /s B:\ /f ALL X: net use /d T: /y pause wpeutil shutdown