How to get a list of running processes? (on Vista with no Admin privileges)
I want to check if a certain exe is running.
For this I have code (with EnumProcesses, OpenProcess, EnumProcessModules, GetModuleFileNameExA) to get the list of all running processes and the search that list.
This works fine if the current user has admin privileges.
But if the user has no admin privileges, the call of OpenProcess fails.
Any idea how to solve this?
Last edited by Guenni; October 15th, 2009 at 05:12 AM.
Re: How to get a list of running processes? (on Vista with no Admin privileges)
it seems that on Vista when starting an exe with the VB command Shell I, can check whether that exe is still running or not.
But the VB command Shell may fail due to the UAC. In that case I have to use the Winapi command ShellExecute. But in that case checking if that exe is still running fails.
So, how can I start an exe and then wait until that exe is terminated? (should work on XP, Vista and Win 7)