CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Location
    Munich, Germany
    Posts
    51

    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.

  2. #2
    Join Date
    Jul 2003
    Location
    Munich, Germany
    Posts
    51

    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)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured