问题
So what I want to do is create an executable in a program in vb. What I mean by this is that there is a program that can output a .EXE. What I try to do is to create a program that can output a smaller program that runs predefined commands.
All I know is that it is somehow possible with a STUB. That you open the STUB and add extra code to it and save it again as an .EXE.
回答1:
You can use compiler services to create EXE at run time.
CSharpCodeProvider : Provides access to instances of the C# code generator and code compiler.
Dynamic Creation of Assemblies/Apps
System.CodeDom.Compiler
来源:https://stackoverflow.com/questions/19463073/create-an-exe-from-an-exe