Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disk drive letter assignment

Status
Not open for further replies.

sfriday

IS-IT--Management
Feb 23, 2002
211
DE
All,
Urgent problem

I am performing an unattended build, I create a 4G C drive to start with, during the build I want to allocate the rest of the space to D - however by the time it hits the section to create the D drive the CD has kicked in and nicked the d drive resulting in a failure to create the correct D drive.

I am going to change my build so that the extra saoce becomes the E drive, however at the end of the build I want to use a VBS to swap the drive letters round so that the CD ends up on E.

Anyone got any ideas, can I do this with WMI.

I have looked at Technet Scripting but there is not an example of moving a drive letter.

Any help would be seriously appreciated.

Steve
 
Its OK I have fixed this, could not do it with VB so I managed to use DISKPART as follows

Diskpart
Select Volume 0 (CD Drive)
Assign Letter E
Select Disk 1 (Hard Drive)
Assign Letter D


This is picked up in cmdlines.txt by calling a batch file which then formats the drive as NTFS.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top