473,769 Members | 2,063 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Return Disk Number (i.e. "Disk 0" for C Drive)??

Anyone know how to return the disk number (i.e. the number you see
when you launch windows disk manager and see your drives numbered disk
0, disk 1, etc.)? I'm not talking about the volume serial number or
drive serial number. For example, I want to programatically determine
what disk number the c drive is using vb.net and windows 2000.

Thanks,

Mike Beccaria
Nov 21 '05 #1
2 2301
Check out the System.Manageme nt namespaces and get to know WMI. You'll be
looking for LogicalDisk queries.. its kinda like SQL for your computer.

-CJ

"mikeybe" <mi******@hotma il.com> wrote in message
news:41******** *************** ***@posting.goo gle.com...
Anyone know how to return the disk number (i.e. the number you see
when you launch windows disk manager and see your drives numbered disk
0, disk 1, etc.)? I'm not talking about the volume serial number or
drive serial number. For example, I want to programatically determine
what disk number the c drive is using vb.net and windows 2000.

Thanks,

Mike Beccaria

Nov 21 '05 #2
I went through the logicaldisk wmi class and tried all of the
variables that I thought would apply, and none of them return the disk
number. Any other thoughts?

Mike
"CJ Taylor" <cege [ahh ttt] tavayn wooohooo hooo ohhh com> wrote in message news:<eI******* *******@TK2MSFT NGP10.phx.gbl>. ..
Check out the System.Manageme nt namespaces and get to know WMI. You'll be
looking for LogicalDisk queries.. its kinda like SQL for your computer.

-CJ

"mikeybe" <mi******@hotma il.com> wrote in message
news:41******** *************** ***@posting.goo gle.com...
Anyone know how to return the disk number (i.e. the number you see
when you launch windows disk manager and see your drives numbered disk
0, disk 1, etc.)? I'm not talking about the volume serial number or
drive serial number. For example, I want to programatically determine
what disk number the c drive is using vb.net and windows 2000.

Thanks,

Mike Beccaria

Nov 21 '05 #3

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

Similar topics

7
1844
by: MLH | last post by:
?dcount("","qryOwnrsDueITSwMissingAddr") when run in the immediate window return a number greater than the number of rows that display when the saved query is run - opening in the database window? I consistently see 2 rows in qryOwnrsDueITSwMissingAddr opening with a dbl-clik. Yet ?dcount("","qryOwnrsDueITSwMissingAddr") returns 3 and
4
14491
by: Zeeshan | last post by:
hi, i want to get the hard drive number for example if if have drive letter C it should tell me Disk number as 1 and suppose if i have another hard disk attach to my system having letter J, the by giving J it should give me disk number 2. Any kind of help will be fuly appreciated Regards, Zeeshan
0
1066
by: eric.goforth | last post by:
Hello, I'm trying to find the available disk space on a folder using VB.NET. I tried using: Dim Info As New System.IO.DriveInfo(sAttachmentDir) Console.WriteLine("Total disk space " & Info.TotalSize) Console.WriteLine("Available disk space " & Info.TotalFreeSpace)
2
7450
by: unknown; | last post by:
hi, i want to write an application who can acces a disk/partition in windows xp. I know how to do that if the disk/partition has a drive letter. But in this case the disk has no driveletter and is in that case for normal users invisible in windows xp. i've searched the internet but i don't know where to look and i don;t know how to describe my problem.
6
14402
by: CoolRiyaz | last post by:
I want to return record number with my query output. I dont' want to use IDENTITY function and temp table for this purpose as I am dealing with very huge data. any suggestions...
8
1617
by: happiness4all | last post by:
following is the code for dll to read a file and return the number of lines in the file. filedll.cpp #include "stdafx.h" #include<iostream> #include<windows.h> #include<fstream> #include<string> using namespace std;
10
4967
by: deppeler | last post by:
I am wanting to return the number of records (rows) in a flat file db. My script is a resource kit library and each item has a catalog number ($catnumber), instead of the user having to remember the next catalog number to enter as they add a record, I want to be able to either show them the next number or have it as a value in a field on the form. I just need to know how to return the total number of records (rows?) in the db as a number...
4
1527
by: Robba | last post by:
I got a little problem, i have to return the number of the array of the word that is filled in. First there is filled in a sentence, and have to be split. I think i splitted it but now i cant return the number of the index, i only get the number of the char. I hope that some1 can help me. Its written in C# console. Like this: A line of words. Then type one of the words like : line . Than i need to get returned 1....
1
1387
by: Fred Roach | last post by:
I'm trying to write a macro that will keep track of sales/commissions. I have written a simple macro that will ask the user for data using input boxes, and place that data into an inserted line. The sheet is divided into two areas, one above the other. To sort the first set of sales by invoice number, I wrote a macro to look for data beyond line 3 to the first blank line and sort by column A. However, I do not know how to make it sort the lower...
0
9416
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
10032
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...
0
8861
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
7393
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
6661
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
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5433
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3948
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2810
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.