Groups | Blog | Home
all groups > vb.net > january 2006 >

vb.net : Locking Application to HDD Sr.No.


surendra.rajput
1/11/2006 10:29:28 PM
Hi,
can anyone help me with the code or instructions to write a code to
read the HDD sr no and lock my application to this no. for security and
piracy protection of my application.

Thanks a million in advance.

Surendra
Ken Tucker [MVP]
1/12/2006 7:07:16 AM
Hi,

Add a reference to system.management

Dim moReturn As Management.ManagementObjectCollection
Dim moSearch As Management.ManagementObjectSearcher
Dim mo As Management.ManagementObject

moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_LogicalDisk where MediaType = 12")

moReturn = moSearch.Get

For Each mo In moReturn
Debug.WriteLine(mo("Name") & " " & mo("VolumeSerialNumber"))
Next


Ken
----------------------
[quoted text, click to view]

Carlos J. Quintero [VB MVP]
1/12/2006 1:01:43 PM
To read the HDD serial number see:

http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21346708.html

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio 2005, Visual Studio .NET,
VB6, VB5 and VBA
You can code, design and document much faster in VB.NET, C#, C++ or VJ#
Free resources for add-in developers:
http://www.mztools.com


"surendra.rajput" <surendra.rajput@gmail.com> escribió en el mensaje
news:1137047368.124892.137740@g49g2000cwa.googlegroups.com...
[quoted text, click to view]

Herfried K. Wagner [MVP]
1/12/2006 1:57:21 PM
"surendra.rajput" <surendra.rajput@gmail.com> schrieb:
[quoted text, click to view]

I think this is a bad idea. Harddisks often crash and are replaced by new
disks. Can you afford a 24/7 support hotline?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
C-Services Holland b.v.
1/13/2006 1:35:46 PM
[quoted text, click to view]

Doesn't that just get the serialnr for the partition. Reformat and it's
changed.


--
Rinze van Huizen
AddThis Social Bookmark Button