K2000 USB Deployment (default drive)
Answers (2)
maybe with fsutil
>>>>>>>>rash thoughts:
get driveletter:
for /F "tokens=1*" %%a in ('fsutil fsinfo drives') do (
for %%c in (%%b) do (
for /F "tokens=3" %%d in ('fsutil fsinfo drivetype %%c') do (
if "%%d" equ "Removable" (echo Drive %%c is Removable && set usbdrive=%%c)
rem german if "%%d" equ "Austauschbares" (echo Drive %%c is Removable && set usbdrive=%%c)
)
)
)
make diskpartscript:
set disparttxt=%usbdrive%diskpart.txt
echo select volume %usbdrive% >%disparttxt%
echo assign letter=q >>%disparttxt%
echo select volume 0 >>%disparttxt%
echo select disk 0 >>%disparttxt%
echo clean >>%disparttxt%
echo create partition primary size=150000 >>%disparttxt%
echo assign letter="C" >>%disparttxt%
echo active >>%disparttxt%
echo create partition Primary >>%disparttxt%
echo assign letter="D" >>%disparttxt%
echo Exit >>%disparttxt%
start diskpart:
diskpart /s %disparttxt%