jaclaz Posted August 1, 2009 Posted August 1, 2009 JaclazThough long time past since I have written above post, I think the problem you pointed out over and over. Finally, I think the problem comes from your ITALIAN xp system that is because of different system code.I found a strang letter from your feedback too--"Jí". I don't know what it is.I hope for a long time and again you could give your registry value of "HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices" for me to check.My batch files have been downloaded by many Chinese and no bugs emerge since my last revision (same as here attached).Sorry Victor, I completely forgot.Find attached:the output of ddlistw on my system "as is now" (which is different from last report)the exported MountedDevicesthe output of the MBRFIX versionthe output of the DISKPART versionApart from the problem reported, you SHOULD NOT allow the batch to actually attempt reordering drive letters WITHOUT and explicit confirmation by the user.Using the batch as is may botch the setup of an unexperienced user.It happened to my system, though of course I know how to fix it.In this:::two founds with using batch file::1. "?"¡¡can not be as an element of string in the for command::2. one variable can not contain another varable in for command i.e. for %%a in (!ab%c%!) do ..., !ab%c%! has no valuethe ¡¡ are A1A1 hex :vdrvset nk=!fulldrv:~%k%,1!if /i %1 neq !nk! ( set ordereddrv=!ordereddrv! %1¡ú!nk! mountvol %1: /d set viddrv=!viddrv! !totalvid:~%e%,38!!nk!)goto :eofthe ¡ú are A1FA hexjaclazreport.zip
victor888 Posted August 2, 2009 Author Posted August 2, 2009 Hi, JaclazI am sure there something strange in your registry:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Disk\Enum, where a unrecognizable disk exist.So do include here your this registry values.
Yzöwl Posted August 2, 2009 Posted August 2, 2009 This batch work under winpe and winnt systems(2k,2k3,xp,vista)Your code appears to completely ignore Windows 2000.You only supply mountvol executables for 2k3, xp and vista, but I'm sure that 2k doesn't work with later versions of mountvol and there's no check for Reg.exe which is not by default part of the Windows 2000 OS!
victor888 Posted August 3, 2009 Author Posted August 3, 2009 I have no win2k system to check, if you can, let me know result.
jaclaz Posted August 3, 2009 Posted August 3, 2009 Hi, JaclazI am sure there something strange in your registry:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Disk\Enum, where a unrecognizable disk exist.So do include here your this registry values.Rest assured that there is NOTHING "strange" in my Registry , and particularly NOT in HKLM\\SYSTEM\CurrentControlSet\Services\Disk\Enum. However, find attached the relevant exported key. jaclazjaclaz_services_disk_enum.zip
Yzöwl Posted August 3, 2009 Posted August 3, 2009 I have no win2k system to check, if you can, let me know result.There will be no result, without a version of reg.exe which uses the syntax used in your script; or access to the correct version of mountvol.exe your script will not work on Windows 2000!
victor888 Posted August 3, 2009 Author Posted August 3, 2009 Hi, above.You are right, it is my fault, the batches don't fit for WIN2K system.
victor888 Posted August 3, 2009 Author Posted August 3, 2009 Hi, JaclazMy suspiiion is right, your HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Disk\Enum has a strange value---"2"="SCSI\\Disk&Ven_Perisoft&Prod_Virtual_Disk&Rev_0001\\1&2afd7d61&1&000", a virtual disk which has no sigcode and can't be displayed by diskpart.To meet this special situation, I have to revise my code again. Please wait for a short time.Thank you for testing it!
jaclaz Posted August 3, 2009 Posted August 3, 2009 My suspiiion is right, your HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Disk\Enum has a strange value---"2"="SCSI\\Disk&Ven_Perisoft&Prod_Virtual_Disk&Rev_0001\\1&2afd7d61&1&000", a virtual disk which has no sigcode and can't be displayed by diskpart.It's not "strange":http://dictionary.reference.com/browse/strange, in the sense of 4. outside of one's previous experience; hitherto unknown; unfamiliar: strange faces; strange customs.Looky here :http://www.msfn.org/board/index.php?showto...24539&st=11 I actually "introduced" it at the time in order to have a "particular" situation..... jaclaz
victor888 Posted August 4, 2009 Author Posted August 4, 2009 Jaclaz is an odd guy.My English is poor.Tonight I will give revised version.
Yzöwl Posted August 4, 2009 Posted August 4, 2009 Just a quick question, what is the REG QUERY line in the below section supposed to produce?::get all drive letterswmic /? >nul 2>&1if errorlevel 1 ( for /f "tokens=1 delims= " %%a in ('REG QUERY HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\ /s ^|find "2\\"') do ( set adv=%%a set adv=!adv:~-3! set tdv=!adv:~0,2! if !tdv! equ \\ ( set adv=!adv:~-1! set ALLDRV=!ALLDRV! !adv! ) )) else ( for /f "skip=1" %%a in ('wmic logicaldisk get caption') do ( set adv=%%a set ALLDRV=!ALLDRV! !adv! ))set ALLDRV=%ALLDRV::=%echo All drive letters: %ALLDRV%I do confess I haven't tried to find out from checking all the code, my expectation however was that it would produce a listing the same or similar to the WMIC command.My system doesn't output anything for the REG QUERY hence my question. (see image of output)
victor888 Posted August 5, 2009 Author Posted August 5, 2009 That line is used for win pe to get all drive letters from registry.
Yzöwl Posted August 7, 2009 Posted August 7, 2009 Just a quick question, what is the REG QUERY line in the below section supposed to produce?<snip />That line is used for win pe to get all drive letters from registry.Re-worded:Could you please provide me with a sample of the output from the following command, (when run in the appropriate context), in order for me to assess what is produced.REG QUERY HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\ /s |find "2\\"Thank you.
jaclaz Posted August 8, 2009 Posted August 8, 2009 @victor888MUCH better! the mbrfix one:All drive letters: C D E F G H I M P WMounted drive letters: C D P G W M E F H IInternal hard disk 1 drive letter: CInternal hard disk 2 drive letter: DCd/dvd rom drive letters: P GRemovable drive letters: W M E F H IDRIVE LETTERS to be ordered: P to E, G to F, W to G, M to H, E to I, F to J, Hto K, I to L,Are you sure to make above drive letter changes (Y/N)nDrive letter changing canceled by userPremere un tasto per continuare . . .With some "strange setup" (not the one shown above) from time to time I get a:!nk! was not expected:C:\Downloaded\md5\mbrfix>orderdrv_mbrfix.cmdAll drive letters: C D F G L M P YMounted drive letters: C D P G L MVirtual drive letters: F YInternal hard disk 1 drive letter: CInternal hard disk 2 drive letter: DCd/dvd rom drive letters: P GRemovable drive letters: L MDRIVE LETTERS to be ordered: P to E, L to H, M to I,Are you sure to make above drive letter changes (Y/N)nDrive letter changing canceled by userPremere un tasto per continuare . . .!nk! non atteso.the diskpart version "hangs" from time to time, if re-used several times (possibly a timing problem), right now is stuck, so I cannnot produce an output of it right now, this is the output of the "previous" setup:C:\Downloaded\md5\diskpart>orderdrv_diskpartAll drive letters: C D F G L M P YMounted drive letters: C D P G L MVirtual drive letters: F YInternal hard disk 1 drive letter: CInternal hard disk 2 drive letter: DCd/dvd rom drive letters: P GRemovable drive letters: L MDRIVE LETTERS to be ordered: P to E, L to H, M to I,Are you sure to make above drive letter changes (Y/N)nDrive letter changing canceled by userPremere un tasto per continuare . . .If I may Besides the final "!nk! was not expected", a few remarks, of course just as some small advice in order to better the thingies:the Y in "Virtual drive Letters" is actually a network mapped drive, any way to differentiate it?"All drive letters:" is SORTed"Mounted drive letters:" is NOT SORTed"Cd/dvd rom drive letters:" is NOT SORTedit is more intuitive to see them in alphabetical ordermore generally, a columnar output for the re-mapping would be more readable, i.e. instead of:DRIVE LETTERS to be ordered: P to E, G to F, W to G, M to H, E to I, F to J, Hto K, I to L,this would seem to me more readable:DRIVE LETTERS to be ordered: P to EG to FW to GM to HE to IF to JH to KI to LThanks for the update.jaclaz
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