suddenelfilio
Well-known member
Hello,
I've been building a program X that does some actions on another program Y. I wanted this program X only to be running when the program Y is running and stopped when the program Y is been stopped.
To do this I wrote a windows service that will be monitoring the running services to see if program Y is running. When it is I wanted to let the windows service start program X. This is being done.
The problem is that program X is being started using the same user credentials as the windows service is running in. This causes problems because I can't get to the User Interface of program X and it is also not performing the actions required when program Y is running.
My guess is that I will need to do some impersonation to get the program started using the currently logged on user.
Does anyone have an idea on how doing this? Or does someone have a different approch to my problem?
kind regards, Filip
I've been building a program X that does some actions on another program Y. I wanted this program X only to be running when the program Y is running and stopped when the program Y is been stopped.
To do this I wrote a windows service that will be monitoring the running services to see if program Y is running. When it is I wanted to let the windows service start program X. This is being done.
The problem is that program X is being started using the same user credentials as the windows service is running in. This causes problems because I can't get to the User Interface of program X and it is also not performing the actions required when program Y is running.
My guess is that I will need to do some impersonation to get the program started using the currently logged on user.
Does anyone have an idea on how doing this? Or does someone have a different approch to my problem?
kind regards, Filip