473,765 Members | 2,172 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Managem ent) 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 3267
"Dmitry Klymenko" <te**@proofingo nline.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.Managem ent)


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

"Dmitry Klymenko" <te**@proofingo nline.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.Managem ent) 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******* *******@tk2msft ngp13.phx.gbl.. .
"Dmitry Klymenko" <te**@proofingo nline.com> wrote in message
news:d7****** *****@news.dg.n et.ua...
Do exists a way to detect a volume label of a disk?
I've found the way to do this using WMI (System.Managem ent) 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******** ******@TK2MSFTN GP15.phx.gbl...
"Dmitry Klymenko" <te**@proofingo nline.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.Managem ent)


Er, so why not use that, then...?
Nov 17 '05 #5
Will Longhorm operate with volume label logical entity ?
"Dmitry Klymenko" <te**@proofingo nline.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******* *******@tk2msft ngp13.phx.gbl.. .
"Dmitry Klymenko" <te**@proofingo nline.com> wrote in message
news:d7****** *****@news.dg.n et.ua...
Do exists a way to detect a volume label of a disk?
I've found the way to do this using WMI (System.Managem ent) 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**@proofingo nline.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******** ********@TK2MSF TNGP12.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**@proofingo nline.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**@proofingo nline.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******** ********@TK2MSF TNGP12.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**@proofingo nline.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
4943
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 from Python? I guess it would be some MFC call in Windows (I don't know anything about doing that), and some ??? call in Linux? Could use both. Thanks!
1
11473
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 anyone any ideas? I am writing XML into a Memory STream and using a Transform to make
1
7649
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
7680
by: Eddie | last post by:
Hi, Anyone know how to get a Drive's Volume Label using vb.net? Thanks in advance. Eddie
16
6153
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 and another for volume with an OK button. I have the code to put into the OK button (Which I've done): Private Sub OK_Click( ) --not this line r = Val(radius.Text) --input this line h = Val(hght.Text) --input this...
6
2679
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 card, and that works fine. But I would also like to be able to make the Volume Label on each flash card the job name its files belong to. I can't work out how to either write the Volume Label to the cards, or to remove it when I erase them. I...
4
4770
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 drive letter, but the label is always blank. Any thoughts? DriveInfo drives = DriveInfo.GetDrives(); foreach (DriveInfo di in drives) { Console.WriteLine("----------------------");
4
1588
by: Dachshund Digital | last post by:
Enable Volume Compression? On NTFS volume?
7
11592
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 that time it is showing SubjectofIssue););//http:\127.0.0.1:81\help\Subject of Issue.txt So the error comming in jsp page. Please look at my error log.
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9951
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8831
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7375
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5419
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.