Билдер/Сплиттер- называйте как хотите)
Билдер:
Код:
Private Sub Command1_Click()
Dim Stub As String
Open App.Path & "\" & "Stub.exe" For Binary As #1
Stub = Space(LOF(1))
Get #1, , Stub
Close #1
Dim Key As String
Key = "[!!Key!!]"
Dim Txt As String
Txt = Text1.Text
Open App.Path & "\serv.exe" For Binary As #1
Put #1, , Stub
Put #1, , Key
Put #1, , Txt
Put #1, , Key
Close #1
MsgBox "Готово!", vbInformation, Me.Caption
End Sub
Stub:
Модуль:
Код:
Declare Function GetModuleFileNameA Lib "kernel32" (ByVal hModule As Integer, ByVal lpFileName As String, ByVal nSize As Integer) As Integer
Код:
Private Sub Form_Load()
Dim KeyKeyKey As String
Dim Spl As String
Open FilePath For Binary As #1 'или же банальный вариант с App.Path + "\" + App.EXEName + ".exe"
Spl = String$(FileLen(FilePath), " ")
Get #1, , Spl
Close #1
KeyKeyKey = "[!!Key!!]"
Dim SpltSplt() As String
SpltSplt() = Split(Spl, KeyKeyKey)
Text1.Text = SpltSplt(1)
End Sub
Public Function FilePath() As String
Dim i As Long
Dim sParams() As String
ReDim sParams(0)
For i = 0 To Len(FilePath)
sParams(0) = String$(256, " ")
FilePath = GetModuleFileNameA(i, sParams(0), 256)
FilePath = sParams(i)
Next i
End Function