I am having issues with the optical drive snatching my drive letter D:, preventing my captured Windows 7 image from deploying the system partition (C:) and OS (D:). Is there anyway to run a preinstallation batch file to change anything using d: to another drive letter?

Thank you!

Answer Summary:
Use Diskpart to rearrange the drives.
0 Comments   [ + ] Show Comments


Please log in to comment

Community Chosen Answer


I believe that you can use the Diskpart command to change the drive letter. I've linked a technet article that shows an example of this. Hopefully it will work, Windows is usually pretty picky about it's reserved drive letters

Answered 05/01/2012 by: elgoosea
Yellow Belt

  • That should work. I worked up the diskpart script:

    list volume
    select volume c
    remove letter=C
    select volume d
    remove letter=D
    select volume e
    remove letter=E
    select volume f
    remove letter=F

    The letters are not important to me since my other diskpart script will assign these, but is thourough enoughe where to make sure the potentially needed partition letter assignments are removed.
  • Then again, it fails on the first line if the drive letter, for example c:, doesn't exist. Maybe I should make these into different scripts.
Please log in to comment



Use the following preinstall task something like the following.  By using Disk rather than Volume, you should only get hard drives.  This is also important when deploying from the USB key.  You *must* move the USB key out of the way or you will format it.

select volume d
assign letter=q
select disk 0
create partition primary size=200
select partition=1
format fs=ntfs quick
assign letter=d
select disk 0
create partition primary
select partition=2
format fs=ntfs quick
assign letter=c

Answered 05/10/2012 by: philologist
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity