Page 1 of 1

diskpart + batch....

Posted: 28 May 2009 19:57
by jakerrulz
Hey everyone,
i have been working on this script that will make a usb drive bootable (yes, its possible) and ive been running into problems with variables in the diskpart script. Is this even possible???? i hope so...cuz i dont want to go to c++ =/

by variables i mean:
in the batch file have something like

Code: Select all

echo what letter is the drive?:
set /p u=
diskpart /s drive.txt

and then in the drive.txt file

Code: Select all

select drive %u%


**i know there isnt a "drive" flag for diskpart, its the idea thats im getting at

Posted: 29 May 2009 08:26
by avery_larry
Perhaps you can use your batch file to create the drive.txt file. I'm not particularly familiar with the diskpart command . . .

Code: Select all

echo what letter is the drive?: 
set /p u=
echo select drive %u% >> drive.txt
diskpart /s drive.txt

Posted: 29 May 2009 11:53
by jakerrulz
thank you!
ive added the needed lines and it is working!
:D

grr, now im having other problems =/, there should be a standard for usb booting...

Posted: 16 Jun 2009 14:09
by Eagle710
What does your code look like now?