Hi Willsonfang,
Try this:
1. Right click on your project in the solution explorer and choose 'Add -> Existing Item'.
You can now find your file in the solution explorer.
2. Go to the properties window of your file and change the 'Build Action' to 'Embedded Resource'.
3. Then add this to your code:
Code:
Dim embeddedResource As Stream = Reflection.Assembly.GetEntryAssembly.GetManifestResourceStream("SolutionName.Test.exe")
Dim fileStream As New FileStream("C:\Test.exe", FileMode.OpenOrCreate)
For index As Int64 = 0 To embeddedResource.Length - 1
fileStream.WriteByte(CByte(embeddedResource.ReadByte))
Next
fileStream.Close()
You have to replace SolutionName with the name of your Solution, obviously :) and test.exe with the name of your file.
Hope that helps!