What are the default access rights for a process started with ShellExecuteEx?
I need to perform certain operations on a process started with ShellExecuteEx
- like waiting for it, duplicating handles, querying and setting information etc. Now I am wondering if I can do all these things on the hProcess开发者_如何学JAVA
member which is returned in the SHELLEXECUTEINFO
structure I pass to ShellExecuteEx
. Does anybody know this?
Does the process that called ShellExecuteEx
have rights like PROCESS_DUP_HANDLE
, SYNCHRONIZE
, PROCESS_SET_INFORMATION
, PROCESS_QUERY_INFORMATION
(and so on) by default, when using the returned hProcess
?
I would guess that it is the same as what you get from CreateProcess, though even that documentation doesn't say (I would venture PROCESS_ALL_ACCESS). In any event, you could always do GetProcessId() and OpenProcess() to open it with whatever access you need.
Yes. The online time you need to worry about access rights is if you do any task that trigger the uac, then you need to set the requestedExecutionLevel= 'highestAvailable'
精彩评论