如何“每次运行另一个进程B时自动生成进程A?” [英] how to 'automatically spawn a process A everytime another process B runs?'

查看:102
本文介绍了如何“每次运行另一个进程B时自动生成进程A?”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过在启动时自动启动另一个应用程序(例如,记事本)来影响现有进程(例如,资源管理器)的行为。什么是最好的方法?



我知道的一种方法是通过Appinit_dll设置将代码注入dll用于资源管理器。然后代码注入dll产生记事本。但这样做不仅会影响资源管理器,还会影响加载user32.dll的所有进程。我是对的吗?



有没有其他方法?

I need to influence the behaviour of an existing process (e.g., explorer) by automatically launch another application (e.g., notepad) whenever it starts. What would be the best approach?

One way that I know is to use code injection dll to the explorer through Appinit_dll setting. The code injection dll then spawns the notepad. But doing so would affect not only explorer but all process that loads user32.dll. Am I right?

Is there any other method?

推荐答案

如果您专门针对资源管理器.exe,你可以使用BHO - Windows资源管理器的浏览器助手对象 [ ^ ]



如果不是,你需要使用其他不经过推荐或保证不起作用的高级技术 -

三种方法将你的代码注入另一个进程 [ ^ ]

更完整的DLL注入解决方案使用CreateRemoteThread [ ^ ]
If you're specifically targeting explorer.exe, you can use a BHO - Browser Helper Objects for Windows Explorer[^]

If not you'll need to use other advanced techniques that are not really recommended or guaranteed to work -
Three Ways to Inject Your Code into Another Process[^]
A More Complete DLL Injection Solution Using CreateRemoteThread[^]


这篇关于如何“每次运行另一个进程B时自动生成进程A?”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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