15 lines
434 B
Batchfile
Executable File
15 lines
434 B
Batchfile
Executable File
@echo off
|
|
|
|
setlocal enabledelayedexpansion
|
|
for /F "tokens=5,6 delims=\ " %%a in ('reagentc.exe /info^|findstr GLOBALROOT') do (
|
|
set "HARDDISK=%%a"
|
|
set HARDDISKID=!HARDDISK:~-1!
|
|
set "PARTITION=%%b"
|
|
set PARTITIONID=!PARTITION:~-1!
|
|
)
|
|
|
|
for /f "tokens=2,3,4,5" %%B in ('^(echo sel disk %HARDDISKID%^&echo list part^)^|diskpart^|findstr /C:"Partition %PARTITIONID%"') do set /A MYEXIT=%%D
|
|
|
|
echo %MYEXIT%
|
|
exit %MYEXIT%
|