I made a bare windows service and have been unable to get it updating properly following the guide. I must be missing something very basic...
I'll post my my code for this spike project in this thread... I started the service after making an update available, got these log messages, then the service was never restarted:
Version 1.0 - 9/12/2011 12:13 PM - 9508 - StartupVersion 1.0 - 9/12/2011 12:13 PM - 9508 - Service ConstructorVersion 1.0 - 9/12/2011 12:13 PM - 9508 - Service OnStartVersion 1.0 - 9/12/2011 12:13 PM - 9508 - Program Not Closing for InstallVersion 1.0 - 9/12/2011 12:13 PM - 9508 - UpdateStep is: NothingVersion 1.0 - 9/12/2011 12:13 PM - 9508 - Forcing check for updateVersion 1.0 - 9/12/2011 12:13 PM - 9508 - auBackend_ReadyToBeInstalled calledVersion 1.0 - 9/12/2011 12:13 PM - 9508 - Update is ready to installVersion 1.0 - 9/12/2011 12:13 PM - 9508 - Calling InstallNow()Version 1.0 - 9/12/2011 12:13 PM - 9508 - Called InstallNow()
The service then exits and is never restarted. I don't see a 'WyUpdate.exe' running either. The service is running as 'Local System' so there should be no perm issues. The files are never updated either, It just exits after calling InstallNow().
Upon subsequent restarts, this is what is logged (the service instantly stops thinking it has an upgrade):Version 1.0 - 9/12/2011 12:14 PM - 5176 - StartupVersion 1.0 - 9/12/2011 12:14 PM - 5176 - Service ConstructorVersion 1.0 - 9/12/2011 12:14 PM - 5176 - Service OnStartVersion 1.0 - 9/12/2011 12:15 PM - 5176 - auBackend_ReadyToBeInstalled calledVersion 1.0 - 9/12/2011 12:15 PM - 5176 - Update is ready to installVersion 1.0 - 9/12/2011 12:15 PM - 5176 - Calling InstallNow()Version 1.0 - 9/12/2011 12:15 PM - 5176 - Called InstallNow()
All I did was slightly modify the 'check every 10 days' part of your Windows Service example... What am I doing wrong? Can I turn on debug logs for WyUpdate? Where does it log to?
Source file contents posted below....