473,320 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Volume label detection

Do exists a way to detect a volume label of a disk?
I've found the way to do this using WMI (System.Management) or winapi function. The second solution is principal non-portable in future, the first one require service WMI to work on client (for sure it's not a guarantee to be allways running). I do not want to include in my application logic, that will attempt to start that service before determining logical drive volume label.

If no way to read volume label - I'll try a combination of both methods, but the most question is why is this so? Does other platforms (not MS) do not operate (at informative level) with volume label?

Thanks
Dmitry Klymenko

Nov 17 '05 #1
8 3242
"Dmitry Klymenko" <te**@proofingonline.com> wrote in message
news:d7***********@news.dg.net.ua...
Do exists a way to detect a volume label of a disk?
I've found the way to do this using WMI (System.Management)


Er, so why not use that, then...?
Nov 17 '05 #2

"Dmitry Klymenko" <te**@proofingonline.com> wrote in message news:d7***********@news.dg.net.ua...
Do exists a way to detect a volume label of a disk?
I've found the way to do this using WMI (System.Management) or winapi function. The second solution is principal non-portable in future, the first one require service WMI to work on client (for sure it's not a guarantee to be allways running). I do not want to include in my application logic, that will attempt to start that service before determining logical drive volume label.

If no way to read volume label - I'll try a combination of both methods, but the most question is why is this so? Does other platforms (not MS) do not operate (at informative level) with volume label?

Thanks
Dmitry Klymenko
Just currious, what's the value of a volume label in windows?

Willy.

Nov 17 '05 #3
>Just currious, what's the value of a volume label in windows?

Willy. With "volume label" I mean the string that can be associated with a drive
letter (usually while formatting/setting up logical drive). Also you may
change the string with right click in Windows Explorer on drive and choose
rename :)

I do not want to link to this label, I do not want to build some logic
according to label - I just only want to read this and show to user. In
practice I need this for CD/DVD drive.

Any suggestion or explanation ?
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:er**************@tk2msftngp13.phx.gbl...
"Dmitry Klymenko" <te**@proofingonline.com> wrote in message
news:d7***********@news.dg.net.ua...
Do exists a way to detect a volume label of a disk?
I've found the way to do this using WMI (System.Management) or winapi
function. The second solution is principal non-portable in future, the
first one require >>service WMI to work on client (for sure it's not a
guarantee to be allways running). I do not want to include in my
application logic, that will attempt to startthat >>ervice before
determining logical drive volume label. f no way to read volume label - I'll try a combination of both methods,
but the most question is why is this so? Does other platforms (not MS) do
not operate
(at informative level) with volume label? Thanks
Dmitry Klymenko


Just currious, what's the value of a volume label in windows? Willy.

Nov 17 '05 #4
>Er, so why not use that, then...?
This will not work if client stops or disabled the WMI service.

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:ud**************@TK2MSFTNGP15.phx.gbl...
"Dmitry Klymenko" <te**@proofingonline.com> wrote in message
news:d7***********@news.dg.net.ua...
Do exists a way to detect a volume label of a disk?
I've found the way to do this using WMI (System.Management)


Er, so why not use that, then...?
Nov 17 '05 #5
Will Longhorm operate with volume label logical entity ?
"Dmitry Klymenko" <te**@proofingonline.com> wrote in message news:d7**********@news.dg.net.ua...
Just currious, what's the value of a volume label in windows?

Willy. With "volume label" I mean the string that can be associated with a drive
letter (usually while formatting/setting up logical drive). Also you may
change the string with right click in Windows Explorer on drive and choose
rename :)

I do not want to link to this label, I do not want to build some logic
according to label - I just only want to read this and show to user. In
practice I need this for CD/DVD drive.

Any suggestion or explanation ?
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:er**************@tk2msftngp13.phx.gbl...
"Dmitry Klymenko" <te**@proofingonline.com> wrote in message
news:d7***********@news.dg.net.ua...
Do exists a way to detect a volume label of a disk?
I've found the way to do this using WMI (System.Management) or winapi
function. The second solution is principal non-portable in future, the
first one require >>service WMI to work on client (for sure it's not a
guarantee to be allways running). I do not want to include in my
application logic, that will attempt to startthat >>ervice before
determining logical drive volume label. f no way to read volume label - I'll try a combination of both methods,
but the most question is why is this so? Does other platforms (not MS) do
not operate
(at informative level) with volume label? Thanks
Dmitry Klymenko


Just currious, what's the value of a volume label in windows? Willy.

Nov 17 '05 #6
What exactly do you mean by that?
Volumes and disk labels aren't the same thing. Disk labels have no real use in windows (they aren't even required), they don't have to be unique, while volume labels have to.
Which kind "label" are you talking about here?

Willy.

"Dmitry Klymenko" <te**@proofingonline.com> wrote in message news:d7**********@news.dg.net.ua...
Will Longhorm operate with volume label logical entity ?

Nov 17 '05 #7
For sure I mean disk label. No neeed to be unique and no need to be required. I just only desire to read it.

I did not understand exactly that this is platform depended, but I beleive it is usufull for users and hope found this in framework.
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl...
What exactly do you mean by that?
Volumes and disk labels aren't the same thing. Disk labels have no real use in windows (they aren't even required), they don't have to be unique, while volume labels have to.
Which kind "label" are you talking about here?

Willy.

"Dmitry Klymenko" <te**@proofingonline.com> wrote in message news:d7**********@news.dg.net.ua...
Will Longhorm operate with volume label logical entity ?

Nov 17 '05 #8
Answered off-line.
The way to get at the disk label is through PInvoke.

Willy.

"Dmitry Klymenko" <te**@proofingonline.com> wrote in message news:d7***********@news.dg.net.ua...
For sure I mean disk label. No neeed to be unique and no need to be required. I just only desire to read it.

I did not understand exactly that this is platform depended, but I beleive it is usufull for users and hope found this in framework.
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl...
What exactly do you mean by that?
Volumes and disk labels aren't the same thing. Disk labels have no real use in windows (they aren't even required), they don't have to be unique, while volume labels have to.
Which kind "label" are you talking about here?

Willy.

"Dmitry Klymenko" <te**@proofingonline.com> wrote in message news:d7**********@news.dg.net.ua...
Will Longhorm operate with volume label logical entity ?

Nov 17 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bob Greschke | last post by:
....the name for a drive (hard or removable) that shows up when, for example, a USB flash drive is recognized by the system. I don't know if this shows up somewhere in Linux. Can this be set...
1
by: Trevor | last post by:
Also posted in general ASP.NET forum. System.IO.IOException: The filename, directory name, or volume label syntax is incorrect. I have hit a problem for which I can find no solutions. Has...
1
by: Eddie | last post by:
Hi, Can anyone provide an example of getting a hard disk/cdrom volume label in C#.net? Thanks in advance, Eddie
2
by: Eddie | last post by:
Hi, Anyone know how to get a Drive's Volume Label using vb.net? Thanks in advance. Eddie
16
by: Basil Fawlty | last post by:
Hi everyone, I have an assignment, to create a simple VB program that computes the volume of a cylinder. The Form is pretty simple, it has a label and text box for base radius, another for height...
6
by: Steve Marshall | last post by:
Hi all, I have an application that can use many different compact-flash cards as storage for different jobs the client is working on. I have added a function to erase all files from a flash...
4
by: herc | last post by:
My objective is to get the "label" information for the different volumes that are mounted. I want to display the same information as Windows Explorer. I wrote this test code with gets me the...
4
by: Dachshund Digital | last post by:
Enable Volume Compression? On NTFS volume?
7
by: sumanta123 | last post by:
Dear Sir when i am getting the value from properties file the the path showing http://127.0.0.1:81/help/Subject of Issue.txt which is right. But in jsp in try block when pass SubjectofIssue path...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.