Hey
Well, Ill give you my source, its not 100% working but should give you the idea xD
Builder:
Code:
Imports System.IO
Public Class Form1
Dim stub, text1, text2 As String
Const FileSplit = "@builder@"
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
text1 = TextBox1.Text
text2 = TextBox2.Text
FileOpen(1, Application.StartupPath & "\stub.exe", OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
stub = Space(LOF(1))
FileGet(1, stub)
FileClose(1)
If File.Exists("Patcher.exe") Then
My.Computer.FileSystem.DeleteFile("Patcher.exe")
End If
FileOpen(1, Application.StartupPath & "\Patcher.exe", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
FilePut(1, stub & FileSplit & text1 & FileSplit & text2 & FileSplit)
FileClose(1)
MsgBox("Your Patcher is ready!")
End Sub
End Class
Stub:
Code:
Imports System.IO
Dim options(), text1, text2 As String
Const FileSplit = "@builder@"
I didnt include the whole stub since it wasnt important.
Important is to have same thing under:
and
Code:
Dim options(), text1, text2 As String
are the options taken from the builder.
Hope I helped