开发者

How to Query process names under low integrity process?

开发者 https://www.devze.com 2023-02-03 02:48 出处:网络
I\'m writing a BHO and I\'d like to execute an external process. If the OS is vista or greater the user may be in protected mode, making my BHO running under a low integrity process.

I'm writing a BHO and I'd like to execute an external process. If the OS is vista or greater the user may be in protected mode, making my BHO running under a low integrity process.

The external process I'm trying to execute is listed in the IE's Elvation Policy list making it running under normal integrity.

I'd like to check if the process is currently running and create it once only if it's not. Problem is that I can't query a process with a higher integrity than mine when i use : HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, dwPID);开发者_StackOverflow社区 I'm able to open only the processes that have low integrity.

Is there any other way to query process names from a low integrity process?

Thanks!


Well, CreateToolhelp32Snapshot solved it, it maps every process no matter what it's integrity. The PROCESSENTRY32 struct has the executable file and that's all i needed.

0

精彩评论

暂无评论...
验证码 换一张
取 消