New
#1181
Gonna Say this Rescue media Does Not contain >
Although I do Have It in PE and see no need for it...however when I try to use mbr2gpt in his rescue WinPE it doesn't recognize the tool
MS is using that Tool to UPGRADE PC's with MBR Disks to GPT Disks if PC Compatible
Yet Another unknown windows 10 upgrade feature
Here are 2 batch Files for use with the mbr2gpt tool > place them in the same folder as exe...
The batch will validate and report any disk type errors before conversion
The mbr2gpt.exe can be found windows/system32 folder beginning with version 1703 up
Windows PE Version (Run in PE)
Windows Allow Full OS Version (Run within Windows)Code:@echo off title MS_MBR2GPT_CMD v17.11.19 rem ================== YY.MM.DD color 17 set "params=%*" setlocal EnableDelayedExpansion cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B ) If not exist "%userprofile%\Desktop\MBR2GPT" ( md "%userprofile%\Desktop\MBR2GPT" wmic diskdrive where "MediaType='Fixed Hard Disk Media'" get Index,Model,Size>>"%userprofile%\Desktop\mbr2gpt\Fixed_HardDisk.txt" ) :startmenu cls echo. echo =============================================================================== wmic diskdrive where "MediaType='Fixed Hard Disk Media'" get Index,Model,Size echo =============================================================================== set /p _index= ^> Enter The Disk Index Number to Validate-Convert: if [%_index%]==[] echo.&echo Invalid User Input&echo.&pause&goto :startmenu echo =============================================================================== cls echo. echo =============================================================================== echo. WOULD YOU LIKE TO CONTINUE TO VALIDATE THE SELECTED DISK %_index% ? echo. echo. NOTE: No Changes Will Be Made To The Disk %_index% At This Time echo. echo. Press 0 - TO EXIT PROGRAM echo. Press 1 - TO CONTINUE TO VALIDATE THE SELECTED DISK %_index% echo =============================================================================== set /p userinp1= ^> Enter Your Option: if [%userinp1%]==[] echo.&echo Invalid User Input&echo.&pause&goto :startmenu if %userinp1% gtr 1 echo.&echo Invalid User Selection&echo.&pause&goto :startmenu if %userinp1%==0 goto :done if %userinp1%==1 ( cls echo. echo =============================================================================== mbr2gpt /validate /disk:%_index% /logs:%userprofile%\Desktop\mbr2gpt echo =============================================================================== ) echo. goto :%errorlevel% exit :convert cls echo. echo =============================================================================== echo. echo. --------------WARNING----------WARNING------------- echo. Once Converted The Disk Will No Longer Boot in CSM-Legacy Mode. echo. Make Sure To Set Your BIOS Settings To Boot UEFI Mode echo. echo =============================================================================== echo =============================================================================== echo. WOULD YOU LIKE TO CONTINUE TO CONVERT THE SELECTED DISK %_index% ? echo. echo. Press 0 - TO EXIT PROGRAM echo. Press 1 - TO CONTINUE TO CONVERT THE SELECTED DISK %_index% echo =============================================================================== set /p userinp2= ^> Enter Your Option: if [%userinp2%]==[] echo.&echo Invalid User Input&echo.&pause&goto :convert if %userinp2% gtr 1 echo.&echo Invalid User Selection&echo.&pause&goto :convert if %userinp2%==0 goto :done if %userinp2%==1 ( cls echo. echo =============================================================================== mbr2gpt /convert /disk:%_index% /logs:%userprofile%\Desktop\mbr2gpt echo =============================================================================== ) echo. If %errorlevel% equ 0 (goto :done) else (goto :%errorlevel%) exit :0 goto convert :1 echo Conversion was canceled by the user. echo.&pause&goto startmenu :2 echo Conversion failed due to an internal error. echo.&pause&goto startmenu :3 echo Conversion failed due to an initialization error. echo.&pause&goto startmenu :4 echo Conversion failed due to invalid command-line parameters. echo.&pause&goto startmenu :5 echo Conversion failed due to error reading the geometry echo and layout of the selected disk. echo.&pause&goto startmenu :6 echo Conversion failed because one or more volumes on the echo disk is encrypted. echo.&pause&goto startmenu :7 echo Conversion failed because the geometry and layout of echo the selected disk do not meet requirements. echo.&pause&goto startmenu :8 echo Conversion failed due to error while creating the echo EFI system partition. echo.&pause&goto startmenu :9 echo Conversion failed due to error installing boot files. echo.&pause&goto startmenu :10 echo Conversion failed due to error while applying GPT layout. echo.&pause&goto startmenu :100 echo Conversion to GPT layout succeeded, but some boot echo configuration data entries could not be restored. echo.&pause&goto startmenu :done cls if exist "%userprofile%\Desktop\mbr2gpt" rmdir /s /q "%userprofile%\Desktop\mbr2gpt" echo. echo =============================================================================== echo. echo. MS_MBR2GPT_CMD echo. Written By KYHI echo. NOV 19,2017 echo. echo =============================================================================== timeout /t 5 >nul exit
Code:@echo off title MS_MBR2GPT_CMD v17.11.19 rem ================== YY.MM.DD color 17 set "params=%*" setlocal EnableDelayedExpansion cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B ) If not exist "%userprofile%\Desktop\MBR2GPT" ( md "%userprofile%\Desktop\MBR2GPT" wmic diskdrive where "MediaType='Fixed Hard Disk Media'" get Index,Model,Size>>"%userprofile%\Desktop\mbr2gpt\Fixed_HardDisk.txt" ) :startmenu cls echo. echo =============================================================================== wmic diskdrive where "MediaType='Fixed Hard Disk Media'" get Index,Model,Size echo =============================================================================== set /p _index= ^> Enter The Disk Index Number to Validate-Convert: if [%_index%]==[] echo.&echo Invalid User Input&echo.&pause&goto :startmenu echo =============================================================================== cls echo. echo =============================================================================== echo. WOULD YOU LIKE TO CONTINUE TO VALIDATE THE SELECTED DISK %_index% ? echo. echo. NOTE: No Changes Will Be Made To The Disk %_index% At This Time echo. echo. Press 0 - TO EXIT PROGRAM echo. Press 1 - TO CONTINUE TO VALIDATE THE SELECTED DISK %_index% echo =============================================================================== set /p userinp1= ^> Enter Your Option: if [%userinp1%]==[] echo.&echo Invalid User Input&echo.&pause&goto :startmenu if %userinp1% gtr 1 echo.&echo Invalid User Selection&echo.&pause&goto :startmenu if %userinp1%==0 goto :done if %userinp1%==1 ( cls echo. echo =============================================================================== mbr2gpt /validate /disk:%_index% /allowfullOS /logs:%userprofile%\Desktop\mbr2gpt echo =============================================================================== ) echo. goto :%errorlevel% exit :convert cls echo. echo =============================================================================== echo. echo. --------------WARNING----------WARNING------------- echo. Once Converted The Disk Will No Longer Boot in CSM-Legacy Mode. echo. Make Sure To Set Your BIOS Settings To Boot UEFI Mode echo. echo =============================================================================== echo =============================================================================== echo. WOULD YOU LIKE TO CONTINUE TO CONVERT THE SELECTED DISK %_index% ? echo. echo. Press 0 - TO EXIT PROGRAM echo. Press 1 - TO CONTINUE TO CONVERT THE SELECTED DISK %_index% echo =============================================================================== set /p userinp2= ^> Enter Your Option: if [%userinp2%]==[] echo.&echo Invalid User Input&echo.&pause&goto :convert if %userinp2% gtr 1 echo.&echo Invalid User Selection&echo.&pause&goto :convert if %userinp2%==0 goto :done if %userinp2%==1 ( cls echo. echo =============================================================================== mbr2gpt /convert /disk:%_index% /allowfullOS /logs:%userprofile%\Desktop\mbr2gpt echo =============================================================================== ) echo. If %errorlevel% equ 0 (goto :done) else (goto :%errorlevel%) exit :0 goto convert :1 echo Conversion was canceled by the user. echo.&pause&goto startmenu :2 echo Conversion failed due to an internal error. echo.&pause&goto startmenu :3 echo Conversion failed due to an initialization error. echo.&pause&goto startmenu :4 echo Conversion failed due to invalid command-line parameters. echo.&pause&goto startmenu :5 echo Conversion failed due to error reading the geometry echo and layout of the selected disk. echo.&pause&goto startmenu :6 echo Conversion failed because one or more volumes on the echo disk is encrypted. echo.&pause&goto startmenu :7 echo Conversion failed because the geometry and layout of echo the selected disk do not meet requirements. echo.&pause&goto startmenu :8 echo Conversion failed due to error while creating the echo EFI system partition. echo.&pause&goto startmenu :9 echo Conversion failed due to error installing boot files. echo.&pause&goto startmenu :10 echo Conversion failed due to error while applying GPT layout. echo.&pause&goto startmenu :100 echo Conversion to GPT layout succeeded, but some boot echo configuration data entries could not be restored. echo.&pause&goto startmenu :done cls if exist "%userprofile%\Desktop\mbr2gpt" rmdir /s /q "%userprofile%\Desktop\mbr2gpt" echo. echo =============================================================================== echo. echo. MS_MBR2GPT_CMD echo. Written By KYHI echo. NOV 19,2017 echo. echo =============================================================================== timeout /t 5 >nul exit
Last edited by Kyhi; 22 Dec 2017 at 15:11.