mdes Posted November 4, 2005 Author Share Posted November 4, 2005 ps: there is no download link on your frist post Oups Thanks, I just forgot to upload it Link to comment Share on other sites More sharing options...
new_user Posted November 4, 2005 Share Posted November 4, 2005 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 Link to comment Share on other sites More sharing options...
drscouse Posted November 4, 2005 Share Posted November 4, 2005 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! Link to comment Share on other sites More sharing options...
mdes Posted November 4, 2005 Author Share Posted November 4, 2005 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! Link to comment Share on other sites More sharing options...
tinnef Posted November 9, 2005 Share Posted November 9, 2005 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. Link to comment Share on other sites More sharing options...
No6 Posted November 26, 2005 Share Posted November 26, 2005 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. Link to comment Share on other sites More sharing options...
mdes Posted November 27, 2005 Author Share Posted November 27, 2005 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. Link to comment Share on other sites More sharing options...
No6 Posted November 27, 2005 Share Posted November 27, 2005 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? Link to comment Share on other sites More sharing options...
mdes Posted November 28, 2005 Author Share Posted November 28, 2005 @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 Link to comment Share on other sites More sharing options...
No6 Posted November 29, 2005 Share Posted November 29, 2005 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. Link to comment Share on other sites More sharing options...
mdes Posted November 29, 2005 Author Share Posted November 29, 2005 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 Link to comment Share on other sites More sharing options...
No6 Posted November 29, 2005 Share Posted November 29, 2005 (edited) 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, 2005 by No6 Link to comment Share on other sites More sharing options...
kamizoli Posted November 20, 2006 Share Posted November 20, 2006 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? Link to comment Share on other sites More sharing options...
mdes Posted November 25, 2006 Author Share Posted November 25, 2006 (edited) 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, 2006 by mdes Link to comment Share on other sites More sharing options...
Aemetz Posted January 25, 2007 Share Posted January 25, 2007 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 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