November 4, 200520 yr Author ps: there is no download link on your frist post Oups Thanks, I just forgot to upload it
November 4, 200520 yr ps: there is no download link on your frist post Oups Thanks, I just forgot to upload it Thank you mdes !I use your previous version works fineLongue vie à Mdes, à Mapdrive et à la France
November 4, 200520 yr Thanks mdes... I really should learn to try the obvious, and read the info in the .cmd!!! After reading it... it more than answered a couple of my questions!!!!One final question (honestly!)... is it possible to implement the functionality of CMDOW (http://www.commandline.co.uk/cmdow/) to eliminate, or reduce the popup/dos windows???Thanks.... now that it all workin fine, I couldnt imagine my Unattended disk without it... CHEERS!
November 4, 200520 yr Author One final question (honestly!)... is it possible to implement the functionality of CMDOW (http://www.commandline.co.uk/cmdow/) to eliminate, or reduce the popup/dos windows???Yes, but I already added "/MIN" in the lastest version, so the DOS batch windows will be minimized: in case of problem, you will know where it occured!ps: I am also using CMDOW in my unattended installation, but not with MAPDRIVE.CMD!
November 9, 200520 yr I tried to add cmdow commands, but it didn't exactly work the first, and didn't feel like messing with it too much, so I'll leave it.Thanks for a great script. I only hope you get around to integrating reader/writer checking sometime soon.
November 26, 200520 yr I hope that people still read this topic.I use this wonderful script in my unattended setup. It does exactly what I want it to do, but I have a small problem that the script may easily take care of also. My other problem is that I have reached my DOS scripting limit, so I hope someone may be able to throw a suggestion.I have a card reader that shows as 4 Removable Drives. I would like to make them disappear from my list. The script removes all drive letters anyway and then re-assigns them, so I need some assistance in telling it to not re-assign letters to removable drives.Any help in inserting the appropriate code would be appreciated.
November 27, 200520 yr Author I have a card reader that shows as 4 Removable Drives. I would like to make them disappear from my list. The script removes all drive letters anyway and then re-assigns them, so I need some assistance in telling it to not re-assign letters to removable drives.Any help in inserting the appropriate code would be appreciated.Did you try the last version (2005/11/04), I didn't deassign letters that don't need to be changed.
November 27, 200520 yr Did you try the last version (2005/11/04), I didn't deassign letters that don't need to be changed.Thank you for the response, Mdes.Yes, I am using the latest version. What I want to do is de-assign the Removable drive letters permanently. I was looking for a script that simply de-assigns all removable drives, but then I discovered your script and I thought that I can combine my requirement to it. I could do it manually I suppose, but your script already has the code. I suppose that I only need to insert a check to see if the drive is Removable and de-assign it before moving to the next drive, but as I said, your script is a little beyond my capabilities. Any suggestions?
November 28, 200520 yr Author @ECHO OFFSETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSIONECHO RESCAN >TMP_LISTVOL.TXTECHO LIST VOLUME >>TMP_LISTVOL.TXTECHO EXIT >>TMP_LISTVOL.TXTSTART "Listing volumes" /WAIT /MIN CMD /C "DISKPART /s TMP_LISTVOL.TXT | MORE | FINDSTR /R /C:"^ *Volume [0-9][0-9]*" >TMP_LISTVOL.LOG"DEL TMP_LISTVOL.TXTFOR /F "usebackq delims=:" %%V IN (TMP_LISTVOL.LOG) DO ( SET LINE=%%V SET VOLUME=!LINE:~2,9! SET TMP_OLD_LETTER=!LINE:~15,1! SET VOLTYPE=!LINE:~39,9! SET VOLINFO=!LINE:~71,8! SET VOLNAME=!LINE:~19,11! IF "!VOLTYPE!" == "REMOVABLE" ( ECHO SELECT !VOLUME! >TMP_TEST1VOL.TXT ECHO REMOVE NOERR ))ECHO EXIT >>TMP_TEST1VOL.TXTSTART "Deassign Removable Drives" /WAIT /MIN CMD /C "DISKPART /s TMP_TEST1VOL.TXT DEL >>TMP_TEST1VOL.TXTNote that some space could be inserted before REMOVABLE => " REMOVABLE" or " REMOVABLE" or ...Type in a DOX box:DISKPARTLIST VOLUMEEXITand see what to put...I've not tested it
November 29, 200520 yr Awesome! Thank you Mdes, it works like a charm! I only had to correct a couple of syntax errors but it was easy.This also explained how delims and tokens work. Double bonus! Thank you again.
November 29, 200520 yr Author Awesome! Thank you Mdes, it works like a charm! I only had to correct a couple of syntax errors but it was easy.So, please post the corrected code
November 29, 200520 yr Oops... Here it is.@CMDOW.EXE @ /HID SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION SET Confirm=1 ECHO RESCAN > TMP_LISTVOL.TXT ECHO LIST VOLUME >> TMP_LISTVOL.TXT ECHO EXIT >> TMP_LISTVOL.TXT START "Listing volumes" /WAIT /MIN CMD /C "DISKPART /s TMP_LISTVOL.TXT | MORE | FINDSTR /R /C:"^ *Volume [0-9][0-9]*" >TMP_LISTVOL.LOG" DEL TMP_LISTVOL.TXT FOR /F "usebackq delims=:" %%V IN (TMP_LISTVOL.LOG) DO ( SET LINE=%%V SET VOLUME=!LINE:~2,9! SET TMP_OLD_LETTER=!LINE:~15,1! SET VOLTYPE=!LINE:~39,10! SET VOLINFO=!LINE:~71,8! SET VOLNAME=!LINE:~19,11! IF "!VOLTYPE!" == "Removeable" ( ECHO SELECT !VOLUME! >> TMP_TEST1VOL.TXT ECHO REMOVE NOERR >> TMP_TEST1VOL.TXT ) ) ECHO EXIT >>TMP_TEST1VOL.TXT IF %Confirm%==1 ( START "Deassign Removable Drives" /WAIT /MIN CMD /C "DISKPART /s TMP_TEST1VOL.TXT DEL TMP_TEST1VOL.TXT DEL TMP_LISTVOL.LOG )EXITI changed SET VOLTYPE=!LINE:~39,9!to SET VOLTYPE=!LINE:~39,10!and at the end,DEL >>TMP_TEST1VOL.TXT to DEL TMP_LISTVOL.LOGOh, and I inserted a confirmation flag for testing purposes.Thank you again for Drive Map and this. Edited November 29, 200520 yr by No6
November 20, 200619 yr Hello.I'm new here. And I hope that someone can help me with my problem and that anyone still follows this thread after so long time.When I use DriveMap with cmdlines.txt it never changes my driveletters. It starts running an but then it stops without any changes. I can just read some access denied messages flashing and the cmd window closes.I have the MapDrive.cmd in the $OEM$ directory and run it with "MapDrive.cmd DEU" from cmdlines.txt.Whe I use it on the running system afterward it runs without a problem.Has anyone an idea what ist going wrong?
November 25, 200619 yr Author Hi kamizoli,Could you run it asMapDrive.cmd DEU TEST LogPathand send me the resulting log file TMP_MAPDRIVE_date_time.LOG? (LogPath = C:\ or whatever)Michel Edited November 25, 200619 yr by mdes
January 25, 200719 yr Hi mdes,I'm struggling with drive letters assignment and raised my question in the German nLite forum.Another member was so kind to link to your thread here in the MSFN forum.I want to integrate your mapdrive-cmd. tool into my nLite Custom CD for Win XP. I have already W2K installed on a system partition of my first IDE harddisk which consists of three partitions now, e.g. 3 drive letters.I have also one raid-1 system (1 drive letter) two optical drives (2 drive letters) and a cardreader with four (virtual) drives installed (4 drive letters). I created an nLite-CD and installed WinXP in the third partition of the IDE-harddisk. However, WinXP assigns the drive letters not in series, but I want the order on the IDE-drive as follows: C: "W2K_SYSTEM", D: "DATA" and F: "WIN_XP". (E: is used for the RAID-drive).When the installation procedure was terminated, WinXP assigned J: to the "WIN_XP"-partition. I cannot rename the "WIN_XP" system partition, as WinXP refused to rename the system partition, of course.As you are experienced with this business, can you tell me whetheryour program is able to reassign system drives also after installation had been finished?I have to do this prior to install WinXP, e.g. integration of your program into the custom installation CD in unattended mode?Maybe other member can give me some help.Thanks so farAemetz
Create an account or sign in to comment