• Log in or sign up for an account here: https://www.sythe.org/login

Serial Protection

  • Thread starter Thread starter Waffles
  • Start date Start date
W

Waffles

Guest
Serial Protection
I do not really know what to call this but its for like, if you made a program and you only want yourself or a certain someone to beable to open it and nobody else even if you send them it.

You will need:
1 Textbox
1 Command Button
-----------------------------
(this is to get the serial)
add this coding to Command1

Code:
Private Sub Command1_Click() Dim serial As String serial = VolumeSerialNumber("C:\") Text1.Text = serial End Sub


then add this under FORM_LOAD of the program you want protected ::

Code:
Private Sub Form_Load() Dim serial As String serial = VolumeSerialNumber("C:\") If serial = "0000-0000" Then 'use the serial finder and then put the serial you get here or it will not open Form1.Show Else MsgBox "Sorry but you do not have permission to open this program" End End If End Sub

Add this module to both the serial finder and prog you want protected

Code:
Public Declare Function GetVolumeSerialNumber Lib "kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long Public Function VolumeSerialNumber(ByVal RootPath As String) As String Dim VolLabel As String Dim VolSize As Long Dim serial As Long Dim MaxLen As Long Dim Flags As Long Dim Name As String Dim NameSize As Long Dim s As String If GetVolumeSerialNumber(RootPath, VolLabel, VolSize, serial, MaxLen, Flags, Name, NameSize) Then s = Format(Hex(serial), "00000000") VolumeSerialNumber = Left(s, 4) + "-" + Right(s, 4) Else VolumeSerialNumber = "0000-0000" End If End Function


Now after you added the module to serial finder run it and push the command , now your serial should be in the text box, copy it and replace 0000-0000 in the form load and now it should work.
 
Serial Protection
Thx dude this will help with my bot im making
 
Runescape Gamblingrunescape gambling
Back
Top