To find out what your HWID is:
Make 1 textbox.
Ok let's start, start with importing the System Management:
[vb]Imports System.Management[/vb]
Put this anywhere, but has to be below Form1 code:
[vb]Public Function GetHDSerial() As String
Dim disk As New ManagementObject("Win32_LogicalDisk.DeviceID=""C:""")
Dim diskPropertyA As PropertyData = _
disk.Properties("VolumeSerialNumber")
Return diskPropertyA.Value.ToString()
End Function[/vb]
In Form_Load, put this code:
[vb]TextBox1.Text = GetHDSerial()[/vb]
So when you open the program, it will automatically tell you your HWID ::yeye::
---------------------------------------------------------------------------------------
Program HWID protection
Do the thing same thing as I did in the top tut.
But make 1 button. Name it Login
Then put this code in Button1:
[vb]Dim rt As New WebClient
Dim rs As String = rt.Downloadstring("http://www.yoursite.com/hwid.txt")
If rs.Contains(GetHDSerial()) Then
Form2.Show()
Else
MessageBox.Show("Access Denied. Now Closing!", "Information")
Me.Close
End If[/vb]
Then make a hwid.txt and put the people's HWID into the hwid.txt if you want them to have login access. Make sure it's a new line for each HWID. Then in http://www.yoursite.com/hwid.txt, edit http://www.yoursite.com to your site link and include /hwid.txt at the end.
Now your done!
The program checks if the person's HWID is in hwid.txt and if it's not a msgbox comes out and program closes. If the person's HWID is in hwid.txt, Form2 opens.
Make 1 textbox.
Ok let's start, start with importing the System Management:
[vb]Imports System.Management[/vb]
Put this anywhere, but has to be below Form1 code:
[vb]Public Function GetHDSerial() As String
Dim disk As New ManagementObject("Win32_LogicalDisk.DeviceID=""C:""")
Dim diskPropertyA As PropertyData = _
disk.Properties("VolumeSerialNumber")
Return diskPropertyA.Value.ToString()
End Function[/vb]
In Form_Load, put this code:
[vb]TextBox1.Text = GetHDSerial()[/vb]
So when you open the program, it will automatically tell you your HWID ::yeye::
---------------------------------------------------------------------------------------
Program HWID protection
Do the thing same thing as I did in the top tut.
But make 1 button. Name it Login
Then put this code in Button1:
[vb]Dim rt As New WebClient
Dim rs As String = rt.Downloadstring("http://www.yoursite.com/hwid.txt")
If rs.Contains(GetHDSerial()) Then
Form2.Show()
Else
MessageBox.Show("Access Denied. Now Closing!", "Information")
Me.Close
End If[/vb]
Then make a hwid.txt and put the people's HWID into the hwid.txt if you want them to have login access. Make sure it's a new line for each HWID. Then in http://www.yoursite.com/hwid.txt, edit http://www.yoursite.com to your site link and include /hwid.txt at the end.
Now your done!
The program checks if the person's HWID is in hwid.txt and if it's not a msgbox comes out and program closes. If the person's HWID is in hwid.txt, Form2 opens.