jaclaz Posted November 30, 2015 Share Posted November 30, 2015 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 Link to comment Share on other sites More sharing options...
dencorso Posted November 30, 2015 Share Posted November 30, 2015 But it could as well give some feedback as to why nothing is listed... even if, of course, no news == good news! Link to comment Share on other sites More sharing options...
jaclaz Posted November 30, 2015 Share Posted November 30, 2015 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 1 Link to comment Share on other sites More sharing options...
jaclaz Posted December 1, 2015 Share Posted December 1, 2015 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 1 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