I want to get the user name who has launched the given application. For Example if Outlook or IE is launched I need to get the Name of the user who has launched it. This should be generic across all Windows OS . But the solution given below is failing in Windows 2003 user ,in both ADMIN and Standard User.
Share
I found this page which gives a function to recover a process owner’s name.
Here is the code (not my code and I couldn’t test it):
Hope it helps.