stuffman Posted June 10, 2004 Share Posted June 10, 2004 Hey everybody,I'm looking for a way to script the reassignment of a drive letter for a cdrom (diskpart doesn't 'see' CD drives), assign a partition the drive letter that the cdrom used to have, then format the partition with the new drive letter. I've tried creating a custom mmc console called diskadmin.msc and using M$ Scriptit to do this for me, but I can't get it to work since the mmc console is the active window, and the snap-in resides within it. Does anyone know if there is an executable within Win2k like there was in NT for getting to Disk Administrator from the command line? Basically I need diskadmin to run on it's own, and not within a mmc console window. Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Noise Posted June 10, 2004 Share Posted June 10, 2004 Oh Alright, I'll give up my little utility. remember people, I had this first.copy to your system32 directory - call from the command line to get usage.It will change the drive letter of any installed CD/DVD drive(s) from the command line. It does no error checking - for example, if you try to assign the 1st cdrom drive as drive C:, it doesn't check to see if drive C: is already allocated and strange things like black holes may form.setcddl.exe Link to comment Share on other sites More sharing options...
stuffman Posted June 11, 2004 Author Share Posted June 11, 2004 YOU ROCK!!!! Thanks,Shawn Link to comment Share on other sites More sharing options...
stuffman Posted June 11, 2004 Author Share Posted June 11, 2004 So what's the syntax for this util? Can you say setcddl x: d: to move it from x: to d:, or do use setcddl d: and it grabs whatever CD drive it finds and assigns it the d:\ drive letter? I tried using setcddl.exe /? but no luck. Thanks,Shawn Link to comment Share on other sites More sharing options...
Noise Posted June 14, 2004 Share Posted June 14, 2004 Just type setcddl.exe in the command window to get usage - NO SWITCHES.Here, I'll do it for ya:C:\>setcddl------------------------------------------------------------------------------SETCDDL.EXE - Changes Drive letter assignments for devices in Win2000Version 1.0 - March 17th, 2000 by Steven Haack - Microsoft Consulting Services------------------------------------------------------------------------------Usage: setcddl <Drive> <Device name> add a drive letter setcddl -r <Drive> remove a drive letter setcddl -c <Drive> Changes 1st CD-Rom to specified drive letterExample: setcddl e:\ \Device\CdRom0 Sets CD-Rom0 to drive e:\ setcddl -r e:\ Removes e:\ from associated device setcddl -c e:\ Changes 1st Cd-Rom to e:\NOTE: You cannot set a device to a specified drive letter, if there is already a drive letter associated with that device. You must remove the current drive letter first, and then assign a new one. The -c option to change the drive letter of the 1st CD-Rom does the removal for you. Link to comment Share on other sites More sharing options...
scp Posted June 14, 2004 Share Posted June 14, 2004 Hey everybody,I'm looking for a way to script the reassignment of a drive letter for a cdrom (diskpart doesn't 'see' CD drives), assign a partitionWhy diskpart doesn't see CD-ROM drives?If I enter LIST VOL I get all types of drives with letters listed. Then you can use SEL VOL x and REMOVE and ASSIGN LETTER=Y.See this post for details Link to comment Share on other sites More sharing options...
stuffman Posted June 15, 2004 Author Share Posted June 15, 2004 Whoa, you were right. Diskpart does see CD drives. Thanks, that helps a lot! I've got all drive assignment handled through one script now!Shawn Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now