So, My Method Of Doing This Is To Save The Batch File In My Resources And Save The Batch As The Resource Executable File.
Source
The Mytemp.Exe Is Just A Blank Dialog File. I've Also Prepared The Entire Source For Download Without Any .Exe Files Of Course.
Full Source Download: http://www.mediafire.com/?6w5379u3j5m99j7
Source
Code
Public Class Form1 Const Filesplit = "@Splitme@"
Dim Message As String
Dim TempFile As String
Dim FilenamePath As String
Dim Tempbat As String = IO.Path.GetTempPath
Dim Filename As String
Private Sub ToolStripButton1_Click(Sender As Object, E As EventArgs) Handles ToolStripButton1.Click
Dim Ofd As New OpenFileDialog
Ofd.DefaultExt = "Bat"
Ofd.Filter = "Batch Files (*.Bat)|*.Bat"
Ofd.FilterIndex = 1
Dim Filename As String
If Ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
Filename = Ofd.FileName
Else : Exit Sub
End If
Message = My.Computer.FileSystem.ReadAllText(Filename, System.Text.Encoding.ASCII)
RichTextBox1.Text = Message
End Sub
Private Sub Button5_Click(Sender As Object, E As EventArgs)
End Sub
Private Sub ToolStripButton2_Click(Sender As Object, E As EventArgs) Handles ToolStripButton2.Click
Dim Sfd As New SaveFileDialog
Sfd.DefaultExt = "Exe"
Sfd.Filter = "Exe Files (*.Exe)|*.Exe"
Sfd.FilterIndex = 1
If Sfd.ShowDialog = Windows.Forms.DialogResult.OK Then
Filename = Sfd.FileName
FilenamePath = Filename
Else : Exit Sub
End If
Dim B As Byte() = My.Resources.MyTemp
Dim FilePath As String = Tempbat + "\MyTemp.Exe"
Dim File As System****.FileStream = IO.File.Create(FilePath)
File.Write(B, 0, B.Length)
File.Close()
FileOpen(1, Tempbat + "\Mytemp.Exe", OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
TempFile = Space(LOF(1))
FileGet(1, TempFile)
FileClose(1)
FileOpen(1, FilenamePath, OpenMode.Binary, OpenAccess.ReadWrite)
FilePut(1, TempFile & Filesplit & Message & Filesplit)
FileClose(1)
System.Threading.Thread.Sleep(1000)
My.Computer.FileSystem.DeleteFile(Tempbat + "\MyTemp.Exe")
MsgBox("Saved As .Exe")
End Sub
Private Sub ToolStripButton3_Click(Sender As Object, E As EventArgs) Handles ToolStripButton3.Click
Me.Close()
End Sub
Private Sub RichTextBox1_TextChanged(Sender As Object, E As EventArgs) Handles RichTextBox1.TextChanged
Message = RichTextBox1.Text
End Sub
Private Sub ToolStripButton4_Click(Sender As Object, E As EventArgs) Handles ToolStripButton4.Click
RichTextBox1.AppendText(VbNewLine & Clipboard.GetText)
End Sub
End ClassThe Mytemp.Exe Is Just A Blank Dialog File. I've Also Prepared The Entire Source For Download Without Any .Exe Files Of Course.
Full Source Download: http://www.mediafire.com/?6w5379u3j5m99j7



![[Image: giphy.gif?cid=790b7611b007c1bdd2cd47171b...y.gif&ct=g]](https://media2.giphy.com/media/q7tD3eB8gRXumzbfvS/giphy.gif?cid=790b7611b007c1bdd2cd47171b9e37dc1125057dcbd235e0&rid=giphy.gif&ct=g)

![[Image: SMnpQ4d.gif]](https://i.imgur.com/SMnpQ4d.gif)