Starting process from service
Hi all,
I have a service which start a process when system boots.
When user log off, the process is shutdown but the service is still running.
I want that when the user logon, the service to start the process again.
How can I do that?
I need it to run under win 7 and win xp.
Thanks.
Re: Starting process from service
I think the best approach would be if you use WMI class Win32_LogonSession.
Re: Starting process from service
Quote:
Originally Posted by eyasso
I have a service which start a process when system boots.
When user log off, the process is shutdown but the service is still running.
Considering the second part of the highlighted I believe you meant "user logs in interactively" instead of "system boot." Otherwise I don't understand why the process shuts at user's logoff.
Quote:
I want that when the user logon, the service to start the process again.
Why would service care about running the process. Properly registered process could be run by Windows shell, as most of such are.