Solved

pendrive usb fl hardware more info

Posted on 2013-06-26
3
481 Views
Last Modified: 2013-12-03
Hi Experts,

Can you help?
I'm not sure about those:

1 - I guess simpler.
Need Delphi solution to know Device usb memory stick space left free total in bytes-hardware (Not Volume which is logical value dependable on formatting etc)

2 - Not sure
Wonder also if that is possible to check s/n number for usb dongle memory ( pendrive) with Delphi simply which will work on all Windows OS


Use new XE Delphi.
0
Comment
Question by:johnnyex
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
Sinisa Vuk earned 500 total points
ID: 39280767
- for usb space: mount/list all volumes of same phisical drive (usb)
http://stackoverflow.com/questions/4645162/how-to-mount-partitions-from-usb-drives-in-windows-using-delphi
... and sum all free bytes...
http://www.delphibasics.co.uk/RTL.asp?Name=DiskFree

- for usb serial number go to my answer to similar question:
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_28140731.html

... Magenta Systems WMI can help you too.
0
 

Author Comment

by:johnnyex
ID: 39289920
sorry again, confused so which solution is best?
here we can see:
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_28140731.html#a39203803

There we can see two methods:
http://stackoverflow.com/questions/4292395/how-to-get-manufacturer-serial-number-of-an-usb-flash-drive


Where author says: "UPDATE
Some drivers of the USB disks does not expose the manufacturer serial number on the Win32_DiskDrive.SerialNumber property, so on this cases you can extract the serial number from the PnPDeviceID property."

So which one is the best method which will work on all drives or maybe use two hybrid if one fail?

Would be good to have one solid solution which will just work is this from first link I posted or second method from stackoverflow link?
0
 
LVL 27

Expert Comment

by:Sinisa Vuk
ID: 39292269
As you said - you can use hybrid method, bu I think that is second (on update) method better.
//note if you have multiple volumes on usb then your serial is: <serial>/<index of partition>
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Six Sigma Control Plans
Starting up a Project

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question