marhk51
asked on
How to make a service start after logon ?
I have created a service in delphi which runs another application. The reason for this is because the application it runs needs to run as a more privileged user. The problem I am having is that the service runs and executes the application before the logon.
The question is; how can I make the service wait until a user has logged on ?
The question is; how can I make the service wait until a user has logged on ?
ASKER
so is there a way I can check if there is a user logged on from within the service before launching the app ?
about notifications see here:
http://msdn2.microsoft.com/en-us/library/aa380543.aspx
but it aint easy task.
you can make your service to go in loop until someone will logon.
ziolko.
http://msdn2.microsoft.com/en-us/library/aa380543.aspx
but it aint easy task.
you can make your service to go in loop until someone will logon.
ziolko.
ASKER
yes, where can I download these notification dlls and supporting documentation ?
if you know name and pass of user you want to be owner of process you might try createprocessasuser or createprocesswithlogon
ziolko
ziolko
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
(Your service will start like it always has, but you can wait to start the applicatioon until a user is logged in - or delay another 30 seconds... whatever you need)
ASKER
Thanks to everyone who responded.
i've seen somwhere in MSDN methods for signup for login/logoff notifications
ziolko.