- Messages
- 2,779
I am try to run a script from my WinPE USB drive - when running the following script - it blows (scrolls) right through it.. I am missing something and the root drive for the file needing to be copied is the winpe drive - it does not stop to give me the choice of bios or uefi - you'll get the jist of the script.. Thanks..
cls
ECHO.
ECHO ===============================================================================
ECHO.
ECHO. Select The Partition Structure Type To Create A Recovery Image
ECHO. Press 'B' For BIOS, Press 'U' For UEFI, Press 'C' to Cancel
ECHO.
ECHO ===============================================================================
ECHO.
choice /c buc /n /m "Select BIOS, UEFI or CANCEL"
IF %ERRORLEVEL%==1 GOTO :BIOS
IF %ERRORLEVEL%==2 GOTO :UEFI
IF %ERRORLEVEL%==3 GOTO :QUIT
:BIOS
cls
ECHO.
ECHO ===============================================================================
ECHO.
ECHO. Creating The System Recovery Image
ECHO. Relax This May Take A While
ECHO.
ECHO ===============================================================================
ECHO.
diskpart /s %root%\z-scripts\bios\assignletters.txt
exit
md R:\RecoveryImage
Copy %root%\z-scripts\bois\resetpartitions.txt r:\recoveryimage
Copy %root%\z-scripts\bois\ResetConfig.xml r:\recoveryimage
W:\Windows\System32\Reagentc /Setosimage /Path R:\RecoveryImage /Target W:\Windows /Index 1
Dism /Capture-Image /CaptureDir:W:\ /ImageFile:R:\RecoveryImage\Install.wim /Name:"Windows"
goto :QUIT
:UEFI
cls
ECHO.
ECHO ===============================================================================
ECHO.
ECHO. Creating The System Recovery Image
ECHO. Relax This May Take A While
ECHO.
ECHO ===============================================================================
ECHO.
diskpart /s %root%\z-scripts\uefi\assignletters.txt
md R:\RecoveryImage
Copy %root%\z-scripts\uefi\resetpartitions.txt r:\recoveryimage
Copy %root%\z-scripts\uefi\ResetConfig.xml r:\recoveryimage
W:\Windows\System32\Reagentc /Setosimage /Path R:\RecoveryImage /Target W:\Windows /Index 1
Dism /Capture-Image /CaptureDir:W:\ /ImageFile:R:\RecoveryImage\Install.wim /Name:"Windows"
goto :QUIT
:QUIT
cls
ECHO.
ECHO ===============================================================================
ECHO.
ECHO. Would You Like To REBOOT The System
ECHO.
ECHO ===============================================================================
ECHO.
choice /c yn /n /m "Select YES or NO"
IF %ERRORLEVEL%==1 GOTO :REBOOT
IF %ERRORLEVEL%==2 GOTO :EXIT
:EXIT
Exit
:REBOOT
exit
exit
cls
ECHO.
ECHO ===============================================================================
ECHO.
ECHO. Select The Partition Structure Type To Create A Recovery Image
ECHO. Press 'B' For BIOS, Press 'U' For UEFI, Press 'C' to Cancel
ECHO.
ECHO ===============================================================================
ECHO.
choice /c buc /n /m "Select BIOS, UEFI or CANCEL"
IF %ERRORLEVEL%==1 GOTO :BIOS
IF %ERRORLEVEL%==2 GOTO :UEFI
IF %ERRORLEVEL%==3 GOTO :QUIT
:BIOS
cls
ECHO.
ECHO ===============================================================================
ECHO.
ECHO. Creating The System Recovery Image
ECHO. Relax This May Take A While
ECHO.
ECHO ===============================================================================
ECHO.
diskpart /s %root%\z-scripts\bios\assignletters.txt
exit
md R:\RecoveryImage
Copy %root%\z-scripts\bois\resetpartitions.txt r:\recoveryimage
Copy %root%\z-scripts\bois\ResetConfig.xml r:\recoveryimage
W:\Windows\System32\Reagentc /Setosimage /Path R:\RecoveryImage /Target W:\Windows /Index 1
Dism /Capture-Image /CaptureDir:W:\ /ImageFile:R:\RecoveryImage\Install.wim /Name:"Windows"
goto :QUIT
:UEFI
cls
ECHO.
ECHO ===============================================================================
ECHO.
ECHO. Creating The System Recovery Image
ECHO. Relax This May Take A While
ECHO.
ECHO ===============================================================================
ECHO.
diskpart /s %root%\z-scripts\uefi\assignletters.txt
md R:\RecoveryImage
Copy %root%\z-scripts\uefi\resetpartitions.txt r:\recoveryimage
Copy %root%\z-scripts\uefi\ResetConfig.xml r:\recoveryimage
W:\Windows\System32\Reagentc /Setosimage /Path R:\RecoveryImage /Target W:\Windows /Index 1
Dism /Capture-Image /CaptureDir:W:\ /ImageFile:R:\RecoveryImage\Install.wim /Name:"Windows"
goto :QUIT
:QUIT
cls
ECHO.
ECHO ===============================================================================
ECHO.
ECHO. Would You Like To REBOOT The System
ECHO.
ECHO ===============================================================================
ECHO.
choice /c yn /n /m "Select YES or NO"
IF %ERRORLEVEL%==1 GOTO :REBOOT
IF %ERRORLEVEL%==2 GOTO :EXIT
:EXIT
Exit
:REBOOT
exit
exit
My Computer
System One
-
- OS
- Windows 3.1 > Windows 10
- Computer type
- PC/Desktop
- System Manufacturer/Model
- Dell XPS 8700
- CPU
- I7
- Memory
- 24 GB