Link to home
Start Free TrialLog in
Avatar of Mawaya
Mawaya

asked on

Batch File Help Windows 7

Trying to Deploy Win7. Need to make a batch file and I need some help. This is what I type in manually right now...

diskpart
select volume 2
format quick fs=ntfs label"win7"
exit
imagex /apply g:\lenovom90zfull.wim 1 d:/
exit

how can I do this with a single batch file? It hangs when I hit the diskpart portion when I make a batch file.
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Why aren't you configuring this with the WAIK and an answer file?
Avatar of Mawaya
Mawaya

ASKER

I'm old school xp. Answer file
isn't what it used to be. didn't know the answer file could erase an existing partition and image over it.

can u help me?
ASKER CERTIFIED SOLUTION
Avatar of RootsMan
RootsMan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mawaya

ASKER

Rootsman,

Do I put the other part after the command like so?

diskpart /s dpcommands.txt
imagex /apply g:\lenovom90zfull.wim 1 d:/
exit
Yes, but without the exit command.
Shouldn't you have a backslash after the D: instead of a regular slash to indicate the root for drive D:?
Avatar of Mawaya

ASKER

heh, typo there that's correct. gonna try your suggestion today.
Avatar of Mawaya

ASKER

This helped! And he also corrected my typo!