Jump to content

[Updated on Feb. 27. 2011] ordering messed drive letter batch file


victor888

Recommended Posts

@Jaclaz

I am really glad that you such an expert to test my batch again and again.

The !NK! problem I should check again.

The diskpart version, I have to say, for multidisk system, diskpart runs slow evern some times hangs.

When I have time I will make further update. Thank you very much.

Edited by victor888
Link to comment
Share on other sites


Thanks for the acknowledgement of my post…

Here is the registry export from a test machine using WinPE

(Reg Export HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2 output.reg)

output.reg

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\A]
"BaseClass"="Drive"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\B]
"BaseClass"="Drive"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\C]
"BaseClass"="Drive"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\D]
"BaseClass"="Drive"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\E]
"BaseClass"="Drive"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\X]
"BaseClass"="Drive"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\Y]
"BaseClass"="Drive"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{5932c341-8515-11de-9904-806e6f6e6963}]
"BaseClass"="Drive"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{5932c344-8515-11de-9904-806e6f6e6963}]
"BaseClass"="Drive"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{5932c345-8515-11de-9904-806e6f6e6963}]
"BaseClass"="Drive"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{5932c348-8515-11de-9904-806e6f6e6963}]
"BaseClass"="Drive"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{d9b257fc-684e-4dcb-ab79-03cfa2f6b750}]
"BaseClass"="Drive"

It follows therefore that the script line I previously asked about will once again return nothing!

…explain please!

Link to comment
Share on other sites

Above

I don't know how to explain it to you. What you need to do is just run the batch under pe, then you could understand everything. Certainly, the some lines under the line you asked also tell what is what.

I have to say, my batches have been donloaded and tested by many many people, exceplt Jaclaz last bug feedback, no bug reported. Here is the reference: http://bbs.wuyou.com/viewthread.php?tid=13...;extra=page%3D4

Link to comment
Share on other sites

I've got to be honest here, considering you wrote the code, you're not really helping me much if you cannot explain to me what your intention was for output from a command within it!

Your code is looking for \\2 in those subkeys of the mountpoints2 branch. As you can see from both a booted system and a PE environment there is no string using a double backslash never mind one with a 2 followed by one.

Since it appears that the registry read is included to replicate the results obtained from the wmic command when that is not available, I expect it to return similar output to that wmic command.

Here's a thought! (based purely on my understanding and the result of my real world test with my WinPE disk)

If you were to change the Find command within the for to read this:

adv=
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\A
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\B
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\C
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\D
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\E
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\X
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\Y
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{5932c341-8515-11de-9904-806e6f6e6963}
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{5932c344-8515-11de-9904-806e6f6e6963}
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{5932c345-8515-11de-9904-806e6f6e6963}
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{5932c348-8515-11de-9904-806e6f6e6963}
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{d9b257fc-684e-4dcb-ab79-03cfa2f6b750}

adv:~-2=
\A
\B
\C
\D
\E
\X
\Y
3}
3}
3}
3}
0}

adv:~,1=
\
\
\
\
\
\
\
3
3
3
3
0

adv~-1=
A
B
C
D
E
X
Y

The resulting ALLDRV variable in that scenario would be:

 A B C D E X Y

So since you were unable to explain, and all I have to go from is this statement:

For PE, all drive letters are find from registry
and this (unuseful to an English speaker) information:

notes.jpg

I have attempted to show you myself!

Therefore:

  • Is your code wrong?
  • Is your code written only for a particular version of WinPE (not mine - Vista based)?
  • Are my systems broken?
  • Do I need to learn batch programming?
  • Am I just wrong?

Please…

Link to comment
Share on other sites

  • Is your code written only for a particular version of WinPE (not mine - Vista based)?

OT, but not much, at least initially, we were talking about PE 1.x (XP/2003 based) as opposed to PE 2.x (Vista/2008based) or PE 3.x (Windows 7 based). :unsure:

It should always be specified as different versions of PE's are not "the same".

jaclaz

Link to comment
Share on other sites

I see so you're updating batch files for an OS which is two generations out of date

(it does make me wonder what real use including the following is)

ver |find " 6.0">nul &&set TheOS=Vista
<snip>
if !TheOS! equ Vista set mfile=mountvol_vs.exe

My WinPE 3.0 disk doesn't even contain a MountPoints2 registry branch, in fact the only place I can find my drives mentioned in the registry is here: HKLM\SYSTEM\MountedDevices.

Link to comment
Share on other sites

I see so you're updating batch files for an OS which is two generations out of date…

Well, personally, I am THREE generations out of date. :w00t:

I thought that using batch files in itself was a declaration in that sense of self-evident relevance. :unsure:

My remark was, as said, sligthly OT and a "general" kind of advice, I have no idea what victor888's intentions are, were or will be. :blushing:

:hello:

jaclaz

Link to comment
Share on other sites

It is my fault that the batch doesn't consider the PE2.X or PE3.X, only ofr PE 1.0.

Pe is only used for maintenance, I think, PE1.X is enough.

Since PE is supplied for deployment of Windows, and PE 1.x isn't created for deploying Vista, and you provided code for that OS, then I suppose that the fault lies squarely with you!
Link to comment
Share on other sites

  • 1 year later...
  • 7 months later...
  • 4 months later...

Sorry for my ignorance, which one of the above batches can list unmounted in Win7 volume numbers on a selected attached disk? If none, can someone offer modification here? :wacko:

Edited by zamarac
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...