从 .EXE 创建 .EXE [英] Create an .EXE from an .EXE

查看:47
本文介绍了从 .EXE 创建 .EXE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我想做的是在 vb 中的程序中创建一个可执行文件.我的意思是有一个程序可以输出.EXE.我尝试做的是创建一个程序,该程序可以输出运行预定义命令的较小程序.

我所知道的是,使用 STUB 以某种方式是可能的.您打开 STUB 并向其添加额外代码,然后将其再次保存为 .EXE.

解决方案

您可以使用编译器服务在运行时创建 EXE.

CSharpCodeProvider :提供对C# 代码生成器和代码编译器.

程序集/应用程序的动态创建>

System.CodeDom.Compiler

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.

解决方案

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

这篇关于从 .EXE 创建 .EXE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆