从服务开始处理 [英] Process starting form a service

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

问题描述

大家好,

如何从服务启动另一个进程?我的意思是我需要从Windows服务中朗读一个exe文件.我正在使用Process.Start("exe的路径");

Hi All,

How can I start another process from a service? I mean I need to rum an exe from my windows service. I''m using Process.Start("Path to exe"); This is not working fine?

推荐答案

此处中所述使用Process 元素 [ ^ ].
The following question[^] was asked earlier - it should help you out.

Basically you are using the Process element as described here[^].


服务通常在系统帐户下运行,并且没有UI.

因此,您只能从它们中生成其他命令行(无UI)进程.
Services usually run under the system account and have no UI.

So you can only spawn other command line (no UI) processes from them of you need to.


您无法在Windows服务中执行此操作,因为Windows Services并非旨在运行交互式应用程序有关更多详细信息,请检查此线程.我认为这是您问题的理想解决方案.这是链接 [
You can not able to do this in a windows service because Windows Services are not designed to run interactive applications For more detailed info check this thread .I think this is the perfect solution to your question. Here is the link [^]

Good luck


这篇关于从服务开始处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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