AutoUpdater.NET icon indicating copy to clipboard operation
AutoUpdater.NET copied to clipboard

Can i use it for windows service.

Open yasirrose opened this issue 6 years ago • 5 comments

I have tried it for windows service.

It close the service and nothing happen after it.

Can you please let me know how can i implement it for windows service project?

yasirrose avatar Oct 02 '19 18:10 yasirrose

Are you using a Zip file or Installer as the update file?

ravibpatel avatar Oct 04 '19 05:10 ravibpatel

@ravibpatel I have tried both. I want to update service silently without showing any download dialogue.

To update Service through installer from service project:

  1. It shouldn't use dialog to download updates as service is non interactive application. So it is not allowing dialog.
  2. If we can update application through service then we don't require administrator access because service is already working with that account.
  3. But if we are updating service through form application. Then we also need administrator access and it should uninstall the service and then install it again. Otherwise it will show 'service already installed'. We can only uninstall service from within service application.
  4. If i replace the files through any form application. Then it also need administrator access to replace files in program file and stop the service. After replacing, we need any process which start service again.

So i think, it will work for service if we should have method which doesn't work through form components like dialogue and message box because in that case, it can be added in windows service application.

Can you please suggest any workaround for it?

yasirrose avatar Oct 04 '19 11:10 yasirrose

@yasirrose I'm working on v2.0 which will have .NET Standard library. You can use the CheckForUpdateEvent with download code from the v2.0 branch to make this possible but I didn't test v2.0 branch much.

https://github.com/ravibpatel/AutoUpdater.NET/blob/v2.0/AutoUpdater.NETStandard/Updater.cs#L132

ravibpatel avatar Oct 04 '19 16:10 ravibpatel

Hi @ravibpatel Anything new on the topic of updating from a windows service? I mean about update service silently without showing any download dialogue. Regards

srad07 avatar Jun 17 '20 15:06 srad07