473,405 Members | 2,415 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,405 software developers and data experts.

Hard Drive

There is a unique identifying number of each hard drive. There is suppose to
be a way of picking up that number. Does anyone hear remeber how to do that?
Nov 20 '05 #1
2 1056
* "scorpion53061" <sc****************************@yahoo.com> scripsit:
There is a unique identifying number of each hard drive. There is suppose to
be a way of picking up that number. Does anyone hear remeber how to do that?


AFAIK it's not a unique number, but you can determine the
'VolumeSerialNumber' (a string) using WMI:

Add a reference to "System.Management.dll":

\\\
Dim disk As New ManagementObject( _
"Win32_LogicalDisk.DeviceID=""C:""" _
)
Dim diskProperty As PropertyData
For Each diskProperty In disk.Properties
Console.WriteLine( _
"{0} = {1}", _
diskProperty.Name, _
diskProperty.Value _
)
Next diskProperty
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #2
Thanks herfried........I used to remeber.... :(

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bo*************@ID-208219.news.uni-berlin.de...
* "scorpion53061" <sc****************************@yahoo.com> scripsit:
There is a unique identifying number of each hard drive. There is suppose to be a way of picking up that number. Does anyone hear remeber how to do
that?
AFAIK it's not a unique number, but you can determine the
'VolumeSerialNumber' (a string) using WMI:

Add a reference to "System.Management.dll":

\\\
Dim disk As New ManagementObject( _
"Win32_LogicalDisk.DeviceID=""C:""" _
)
Dim diskProperty As PropertyData
For Each diskProperty In disk.Properties
Console.WriteLine( _
"{0} = {1}", _
diskProperty.Name, _
diskProperty.Value _
)
Next diskProperty
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>

Nov 20 '05 #3

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

Similar topics

1
by: Daniel | last post by:
when writing out a file from .net, when is the file created? after the bytes are all written to the hard drive or before the bytes are written to the hard drive?
0
by: Bruce W...1 | last post by:
I installed a new hard drive in my PC, setup Windows, Visual Studio, etc.. The old hard drive is now on IDE 2, and I will eventually be using it for backup. On the old hard drive are a few...
18
by: Joe Lester | last post by:
This thread was renamed. It used to be: "shared_buffers Question". The old thread kind of died out. I'm hoping to get some more direction by rephrasing the problem, along with some extra...
3
by: eieiohh | last post by:
MySQL 3.23.49 PHP 4.3.8 Apache 2.0.51 Hi All! Newbie.. I had a CRM Open Source application installed and running. Windows Xp crashed. I was able to copy the contents of the entire hard...
1
by: Billy Bob | last post by:
hi, whenever i open a compressed file in pen drive, a temporary file forms in windows temporary folder, which disappears as soon as i close compressed file in pen drive. but this temporary file in...
16
by: Otie | last post by:
Hi, Is there a way for VB5 to determine exactly where on a hard drive a .exe file is stored upon the .exe file's first copying to the hard drive? What I need to know is the exact hard drive...
23
by: Rotsey | last post by:
Hi, I am writing an app that scans hard drives and logs info about every fine on the drive. The first iteration of my code used a class and a generic list to store the data and rhis took...
2
by: =?Utf-8?B?Y29taXQy?= | last post by:
itried to install xp home edition . everything was loading ok untill eror message that os couldnot find hard disk drive. upon opening bios it shows my cd drive as primary and my dvd drive as...
1
moishy
by: moishy | last post by:
Hi all! I use a internal hard drive as my external hard drive by using a IDE to USB wire. One day, I plug in the electric, but it won't work! I plug the electric into a different hard drive, it...
1
by: =?Utf-8?B?c2hpZw==?= | last post by:
I have an old acer aspire 3610 hard drive that has some very important pictures on it, can someone please advise me as to what I need to get the pictures off the hard drive. Im aware that I will...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.