background:
In my org there is an application that we use for some critical functions, but it only works best when run as a particular user.
The reason for this is that the application stores lots of its configuration as the local user session, and so it becomes a multiuser nightmare, meaning we had to duplicate lots of work.
We have assigned a user to run the application, and found a solution by setting a runas desktop shortcut. The issue is that we have discovered that the application is not able to be run more that once concurrently. It only allows 1 running instance per concurrent user.
The shortcut code I use for the application:
C:\Windows\System32\runas.exe /user:mydomain\runas_user /savecreds "C:\Program Files\MyApp\MyApp.exe"
As such, I've been trying to determine how I can see who is currently using the "runas" application, so I can get them to close it gracefully. Task Manager only shows the "runas_user" in User Name, but I figure there must be some way to determine who ran it or which users session is looking at it.
Question:
Is there some way I can find out (preferably using powershell or some other script) who is currently running the application?