Hi,
Does anyone has an example of windows service, to run everytime that the computer shutdown and startup
And is it possible to install via command line, how can I make it
Thanks
Hi,
Does anyone has an example of windows service, to run everytime that the computer shutdown and startup
And is it possible to install via command line, how can I make it
Thanks
Windows Service - Computer shutdown
AdrianWoods
Javier Martinez
you can setup your service to run automatic in order to get it run when system is started. Thus first requirement is fullfiled.
About executing something on system shutdown you can handle Microsoft.Win32.SystemEvents.SessionEnding event
and there is command line tool that install .NET windows services called installUtil. (see here too http://www.codeproject.com/dotnet/ScriptedServiceInstall.asp)
Hope it helps