从资源启动进程(exe 文件) [英] Launch process (exe file) from resources

查看:57
本文介绍了从资源启动进程(exe 文件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个已编译的 exe 文件,用于转换图像.它被命名为convert.exe.我想在我的 C# 应用程序中使用它,而在我的应用程序文件夹中不可见.所以我想我可以将它添加为资源.问题是:如何启动存储在我的资源中的 exe 文件的外部进程?

I have a compiled exe file which I use to convert images. It is named convert.exe. I want to use it within my C# application without being visible in my application folder. So I thought I could add it as a resource. The problem is: How can I launch an external process of an exe file stored in my resources?

推荐答案

不幸的是,Hans Passant 所说的没有办法解决.实际上,为了运行它,您必须首先将其保存到磁盘.有几个应用程序使用这种方法.其中之一是 SysInternals Process Explorer.它曾经在资源中包含 64 位版本的 EXE(我不是 100% 确定他们在最新版本中仍然这样做).无论如何,网络上有几个示例和教程.这是一个.

Unfortunately, there is no way around what Hans Passant said. Practically, in order to run it you must first save it to disk. There are several applications that use this method. One of them is SysInternals Process Explorer. It used to contain the 64 version of the EXE in a resource (I am not 100% sure they still do it this way in the latest version). In any case there are several examples and tutorials on the web for this. Here is one.

这篇关于从资源启动进程(exe 文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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