如何使用Windows服务与应用程序进行交互? [英] How to interact with application using windows service?

查看:564
本文介绍了如何使用Windows服务与应用程序进行交互?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在跟踪在Windows Vista中用户级别的服务和应用程序之间的交互 [^ ]文章,以使用Windows服务交互会话1的应用程序.

我的问题是,我将如何动态传递应用程序exe路径?不像C:\ Program Files \ ... \ MyApp.exe.是否可以在Windows服务中找到用户应用程序的路径?

谢谢大家,

从下面的评论中复制的其他信息
我不需要获取Windows服务的路径,而需要通过名称或任何其他方式查找任何应用程序的exe路径.

Hi All,

I am following Interaction between services and applications at user level in Windows Vista[^] article to interact application of session 1 using windows service.

My problem is that How I will pass application exe path dynamically? not like C:\Program Files\...\MyApp.exe. Is it possible to find the path of user''s application in windows service?

thank you all,

additional information copied from comment below
I do not need to get windows service''s path whereas I require to find the exe''s path of any application by name or any other manner.

推荐答案

我建议您将其张贴在文章底部的留言板上.如果您这样做,则指导老师将收到有关您的查询的通知.也许他是可以为您提供最佳帮助的人.

您可以检查 http://stackoverflow.com/questions/199961/getting-full-path -for-windows-service [ ^ ].可能有帮助
I recommend you to post in the message board at the bottom of the article. If you do so the autor will receive a notification about your query. Probably he is the one that can help you best.

You can check http://stackoverflow.com/questions/199961/getting-full-path-for-windows-service[^] as well. It might help


我可能会让每个应用程序向服务注册(前提是您控制这些应用程序),然后将其完整路径保存在服务中.如果您不控制其他应用程序,则需要准确确定需要该应用程序的要求,并可能在整个硬盘驱动器中扫描.exe文件.
I would probably have every application register with the service (provided you control these applications) and then save it''s full path at the service. If you don''t control the other application then you need to decide exactly what the requirements are for you to need this application and scan probably the whole hard drive for .exe files.


这篇关于如何使用Windows服务与应用程序进行交互?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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