Yrlec
Posts: 30
Joined: Wed Jun 20, 2012 3:49 pm

Launching AutoUpdater from service

I am trying to launch the auto-updater in silent-mode (/silentall) from a background service. I launch it from a service because the service has some special heuristics that determines the appropriate time to launch the updater. The updater launches but it then gets stuck and never finishes it's execution. My theory is that it fails to launch from the service because the service doesn't have access to the desktop (http://msdn.microsoft.com/en-us/library/bb756986.aspx). The stack trace of the most active thread of the installer strengthens that theory (notice how it tries call something in gdiplus.dll):

ntoskrnl.exe!KeWaitForMultipleObjects+0xc0a
ntoskrnl.exe!KeAcquireSpinLockAtDpcLevel+0x732
ntoskrnl.exe!KeWaitForMutexObject+0x19f
ntoskrnl.exe!__misaligned_access+0xba4
ntoskrnl.exe!__misaligned_access+0x1821
ntoskrnl.exe!KeAcquireSpinLockAtDpcLevel+0x93d
ntoskrnl.exe!KeWaitForMultipleObjects+0x26a
ntoskrnl.exe!NtWaitForSingleObject+0x41f
ntoskrnl.exe!IoReportTargetDeviceChange+0xe5d
ntoskrnl.exe!KeSynchronizeExecution+0x3a23
wow64cpu.dll!TurboDispatchJumpAddressEnd+0x6c0
wow64cpu.dll!TurboDispatchJumpAddressEnd+0xf5
wow64.dll!Wow64SystemServiceEx+0x1ce
wow64.dll!Wow64LdrpInitialize+0x429
ntdll.dll!RtlIsDosDeviceName_U+0x24c87
ntdll.dll!LdrInitializeThunk+0xe
ntdll.dll!ZwWaitForMultipleObjects+0x15
kernel32.dll!WaitForMultipleObjectsEx+0x8e
gdiplus.dll!GdipCreateSolidFill+0x8dc
gdiplus.dll!GdipCreateSolidFill+0x7fb
kernel32.dll!BaseThreadInitThunk+0x12
ntdll.dll!RtlInitializeExceptionChain+0x63
ntdll.dll!RtlInitializeExceptionChain+0x36

I don't need access to the GUI, since I want it to run silently. Is there any way to make sure that the installer won't get stuck waiting for GUI-access when running with /silentall?

The installer was called with the following command line:
DegooUpdater /silentall -nofreqcheck -url "http://downloads.degoo.com/Development/updates.txt"

When I call from a command-prompt (which has access to the GUI) it works as expected (however it shows the progress window saying "Please wait while configuring Degoo).
Yrlec
Posts: 30
Joined: Wed Jun 20, 2012 3:49 pm

Re: Launching AutoUpdater from service

I should also add that the installer is created using the "Limit to basic user interface" option.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Launching AutoUpdater from service

The updater should work without any problems with the command /silentall when called from your services, this has been done before. What I suspect is trying to access UI resources(gdiplus.dll) is the install process, i.e. the setup package launched by the updater.

Can you please set command line "/qn" for it in the updates configuration project, so it is launched with a silent install option by the updater?

Please note that "/silentall" affects only the UI of the updater, not the one of the setup packages it tries to install, for them you need to specify the UI parameters separately.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Yrlec
Posts: 30
Joined: Wed Jun 20, 2012 3:49 pm

Re: Launching AutoUpdater from service

Thanks, that seems to have solved part of the issue. It also got stuck due to this problem: http://www.advancedinstaller.com/forums ... =2&t=20760. After using the suggested fix in that thread I got through that to. Now I have a problem with the main service getting uninstalled but not installed again during the update. The end result of this is that the .exe-file of the service is missing after the upgrade. I will create a new thread about this once I have more detailed info.
Yrlec
Posts: 30
Joined: Wed Jun 20, 2012 3:49 pm

Re: Launching AutoUpdater from service

Never mind the last problem with uninstalls. It was caused by a bug in the shutdown-code of my service.

Return to “Common Problems”