如何静默地从资源运行文件? [英] How to run File from resources silently?

查看:65
本文介绍了如何静默地从资源运行文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI 


我在资源中有exe文件


我想以静默方式运行exe文件


我的意思是它会运行但是图形用户界面
我不希望它出现


因为我的exe文件如果出现它将
分散


谢谢^ - ^


解决方案

您好kasp3r360,


感谢您在此发帖。


对于你的问题,你如何运行这个.exe文件?


如果你在C#中运行它,你可以尝试使用下面的参数。

 ProcessStartInfo psi = new ProcessStartInfo(); 
psi.WindowStyle = ProcessWindowStyle.Hidden;

这是一个供您参考的简单示例。


https://stackoverflow.com/questions/20646111/c-sharp-code-to-run-my-installer-exe-file-in-silent-mode-in-the-background


有关  ProcessWindowStyle.Hidden的更多详细信息,请参阅MSDN文档。


https://msdn.microsoft.com/en-us/library/system.diagnostics。 processwindowstyle%28v = vs.110%29.aspx?f = 255& MSPPError = -2147217396


最好的问候,


Wendy


HI 

I have exe File in resources

I want to run the exe file silently

I mean It will run but the the graphical user interface I do not want it to appear

because my exe file if it appear it will Dispersing

thank you ^-^

解决方案

Hi kasp3r360,

Thank you for posting here.

For your question, how do you run this .exe file?

If you run this in C#, you could try to use the parameter below.

ProcessStartInfo psi = new ProcessStartInfo();
psi.WindowStyle = ProcessWindowStyle.Hidden;

Here is a simple example for your reference.

https://stackoverflow.com/questions/20646111/c-sharp-code-to-run-my-installer-exe-file-in-silent-mode-in-the-background

For more details about ProcessWindowStyle.Hidden, please refer to the MSDN document.

https://msdn.microsoft.com/en-us/library/system.diagnostics.processwindowstyle%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

Best Regards,

Wendy


这篇关于如何静默地从资源运行文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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