Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch.nt    |    Fun with Windows NT batch files    |    68,980 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 67,605 of 68,980    |
|    JJ to Peter    |
|    Re: How Determine Current Status of USB     |
|    16 Jul 20 23:35:56    |
      From: jj4public@vfemail.net              On Thu, 16 Jul 2020 05:07:42 -0700 (PDT), Peter wrote:       > How can I determine in a batch file which one of these three conditions is       > currently true for an external USB drive:       >       > 1. The drive is not currently connected to the PC       > 2. The drive is connected but it is currently locked by Bitlocker       > 3. The drive is connected and it is not locked       >       > Determining #3 is simple but I canąt figure out how to distinguish between       > #1 and #2 in a batch file.       >       > Thanks for any help.              #1 is a matter of checking the USB storage device. Not a drive letter. You       can use WMIC tool to list the DISKDRIVE devices. Use the SerialNumber field       to identify the storage device.              The storage device will not be listed if it's not connected, or has been       "safely removed" via icon tray menu.              If its connected but is locked (i.e. #2), the storage device will be listed       but its drive letter will either don't exist, or is not accessible.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca