unique machine identification

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
i need to "Lock" my dotnet application to run only on particular PCs
that is:
i need to uniquely identify a windows machine from within my application and
exit from the application if the machine id does not match a prior known id
my query is

1.) what would be the best identification to look for such a purpose and how to access it

my environment is the internet and/or ethernet LAN with windows PCs ( 98/2k/Nt/XP

2.) it would be good if i am able to detect the identification of a remote machine on the internet/ ethernet LAN


the application is coded in C#


Thanks in advanc

regard
Manish.
 
Fiddle around with the management class object... there's a load of stuff
there such as hard drive serial number, motherboard serial num, etc... lots
of info that you could use to identify a machine.

Dim cpuInfo As String = String.Empty
Dim temp As String = String.Empty
Try
Dim cimobject As Management.ManagementClass = New
Management.ManagementClass("Win32_Processor")
Dim moc As Management.ManagementObjectCollection =
cimobject.GetInstances()
For Each mo As System.management.ManagementObject In moc
temp = mo.Properties("ProcessorId").Value.ToString()
If (temp.Length > 1) Then cpuInfo = temp
Next
Return cpuInfo
Catch ex As Exception
'failed. Not sure this works on win98
Return "0"
End Try

Manish Buttan said:
Hi,
i need to "Lock" my dotnet application to run only on particular PCs.
that is:
i need to uniquely identify a windows machine from within my application and
exit from the application if the machine id does not match a prior known id.
my query is,

1.) what would be the best identification to look for such a purpose and how to access it.

my environment is the internet and/or ethernet LAN with windows PCs ( 98/2k/Nt/XP )

2.) it would be good if i am able to detect the identification of a remote
machine on the internet/ ethernet LAN.
 
Back
Top