diskpart + batch....

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
jakerrulz
Posts: 2
Joined: 28 May 2009 19:39
Contact:

diskpart + batch....

#1 Post by jakerrulz » 28 May 2009 19:57

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

avery_larry
Expert
Posts: 391
Joined: 19 Mar 2009 08:47
Location: Iowa

#2 Post by avery_larry » 29 May 2009 08:26

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

jakerrulz
Posts: 2
Joined: 28 May 2009 19:39
Contact:

#3 Post by jakerrulz » 29 May 2009 11:53

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...

Eagle710
Posts: 19
Joined: 29 Mar 2009 17:27

#4 Post by Eagle710 » 16 Jun 2009 14:09

What does your code look like now?

Post Reply