Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Explorer volume information

Explorer volume information

Scheduled Pinned Locked Moved C / C++ / MFC
helpdata-structuresquestion
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pheonix
    wrote on last edited by
    #1

    I'm sure this is something simple that I just can't find. I am adding a list of disk drives to a combo box. I used GetLogicalDriveStrings for the list of drives and GetVolumeInformation to get the volume name. I take the volume name and combine it with the drive name so it looks just like the drive tree in explorer. My problem is when a volume does not have a label. When a volume does not have a label, Explorer substitutes a generic string like Local Disk, DVD Drive, DVD/CD-RW. Where does it get these strings? GetDriveType doesn't even have a DVD constant added yet. I don't even know what to look for on MSDN, but everything I have tried have not produced any results. Any help is appreciated!!

    G 1 Reply Last reply
    0
    • P Pheonix

      I'm sure this is something simple that I just can't find. I am adding a list of disk drives to a combo box. I used GetLogicalDriveStrings for the list of drives and GetVolumeInformation to get the volume name. I take the volume name and combine it with the drive name so it looks just like the drive tree in explorer. My problem is when a volume does not have a label. When a volume does not have a label, Explorer substitutes a generic string like Local Disk, DVD Drive, DVD/CD-RW. Where does it get these strings? GetDriveType doesn't even have a DVD constant added yet. I don't even know what to look for on MSDN, but everything I have tried have not produced any results. Any help is appreciated!!

      G Offline
      G Offline
      Graham Bradshaw
      wrote on last edited by
      #2

      This just a guess, but it might be from the registry. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\D\DefaultLabel changes the description in Explorer for my CD-ROM drive when there's no disk in the drive. Note the drive letter in the registry key, so you'll need to change that for other drives.

      P 1 Reply Last reply
      0
      • G Graham Bradshaw

        This just a guess, but it might be from the registry. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\D\DefaultLabel changes the description in Explorer for my CD-ROM drive when there's no disk in the drive. Note the drive letter in the registry key, so you'll need to change that for other drives.

        P Offline
        P Offline
        Pheonix
        wrote on last edited by
        #3

        Graham Bradshaw wrote: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\D\DefaultLabel What version of windows are you using? I'm using XP Home and that key does not exist. I tried searching for DriveIcons and DefaultLabel. Thanks for trying!

        G 2 Replies Last reply
        0
        • P Pheonix

          Graham Bradshaw wrote: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\D\DefaultLabel What version of windows are you using? I'm using XP Home and that key does not exist. I tried searching for DriveIcons and DefaultLabel. Thanks for trying!

          G Offline
          G Offline
          Graham Bradshaw
          wrote on last edited by
          #4

          Pheonix wrote: What version of windows are you using? XP Professional SP1. You may have to add the key - I also have an entry for the E: drive, which is a Memory Stick (the computer is a Sony VAIO laptop).

          P 1 Reply Last reply
          0
          • P Pheonix

            Graham Bradshaw wrote: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\D\DefaultLabel What version of windows are you using? I'm using XP Home and that key does not exist. I tried searching for DriveIcons and DefaultLabel. Thanks for trying!

            G Offline
            G Offline
            Graham Bradshaw
            wrote on last edited by
            #5

            Update: Just tried it here, and it works with a ZIP drive as well. The key quoted is the whole key. If you set the default entry for that key to a string, Explorer picks that up and uses it instead when displaying the drive.

            1 Reply Last reply
            0
            • G Graham Bradshaw

              Pheonix wrote: What version of windows are you using? XP Professional SP1. You may have to add the key - I also have an entry for the E: drive, which is a Memory Stick (the computer is a Sony VAIO laptop).

              P Offline
              P Offline
              Pheonix
              wrote on last edited by
              #6

              I guess the home edition of XP just doesn't contain this key. It's good to know that I can put anything I want in there though. I'm trying to find the windows defaults that explorer uses. I'll keep searching. Thanks for the help!

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups