November 30, 201510 yr Of course! N: is a 12.5 GB Gavotte Ramdisk !!! Then it is a good thing that it isn't listed, as it is unlikely that someone would want to to install grldr.mbr to it. jaclaz
November 30, 201510 yr But it could as well give some feedback as to why nothing is listed... even if, of course, no news == good news!
November 30, 201510 yr Be my guest :@echo offecho This cmd has been run from LogicalDrive %~d0\SET message=FOR /F "tokens=3,6 delims=#,=" %%A IN ('WMIC Path Win32_LogicalDiskToPartition Get Antecedent^, Dependent') DO CALL :isitapartition %%B %%AIF NOT DEFINED message (ECHO You are either dencorso or someone else trying to make a oneliner senselesslyECHO complex without any meaningful reasonECHO Drive letter %~d0\ is NOT assigned to a partition on a disk.) ELSE (echo %message%)pauseGOTO :EOF:isitapartitionIF %1=="%~d0" SET message=LogicalDrive %~d0\ is residing on \\.\Physicaldrive%2GOTO :EOFjaclaz
December 1, 201510 yr And now this is a shorter version (still taking into account use on a non-partition):@echo offecho This cmd has been run from LogicalDrive %~d0\FOR /F "tokens=2 delims=#," %%? IN ('WMIC Path Win32_LogicalDiskToPartition Get Antecedent^, Dependent ^|FIND "%~d0"') DO (ECHO LogicalDrive %~d0\ is residing on \\.\Physicaldrive%%? && GOTO :done)ECHO Drive letter %~d0\ is NOT assigned to a partition on a disk.:donepausejaclaz
Create an account or sign in to comment