Jump to content

Recommended Posts

Posted

Of course! N: is a 12.5 GB Gavotte Ramdisk !!!  :yes:

 

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


Posted

Be my guest :yes::

@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 :EOF

jaclaz

Posted

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.:donepause

jaclaz

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...