Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After syspreping a machine all drive letters are reassigned. How do I prevent this from happening or automatically reasign drive letters after sysprep?

share|improve this question
up vote 2 down vote accepted

you can use diskpart for that. Create text file that contains the diskpart command and then use diskpart /s mydiskpartscript.txt

the diskpart text file would be:

select volume 2
assign letter=D
select volume 3
assign letter=R
share|improve this answer
Correct, but I'm looking to automate this process. If others interested in what Mathieu is talking about you can look at the following links for more info. I found the part I was looking for: Basically under sysprep.ini I'll add the following command, which will reference the diskpart.exe command like you mentioned. [GuiRunOnce] Command0 = C:\AssignDriveLetters.cmd – Eric Hazen Feb 4 '10 at 18:08
sorry , i should have explained the guirunonce in sysprep too – Mathieu Chateau Feb 4 '10 at 18:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.