Jump to content
Xtreme .Net Talk

Is the best way to update a running Service by using another service? [C#]


Recommended Posts

Posted

I need to find a reliable way to update a running Windows Service (Service.exe).

The service is run under the LocalSystem account whereas the logged-in user is in a non-admin User account.

 

My current solution would be as follows:

- The Service.exe checks for updates (files) regularily

- When an update it found it starts another service (Launcher.exe) that would stop the Service.exe, copy over the files, restart Service.exe, then stop itself

 

After doing some online-reading and from some of my previous forum posts I beleive this would be the appropriate solution - but before I go ahead I wanted to check with all the guru's and see if I am forgetting something important or if there is a better way.

 

I did read-up on some method of self-updating (loading & unloading assemblies, etc...) but it just seemed very unsure and I need this to be as robust as possible - if it fails it means someone needs to manually intervene.

 

Any help or hints would be much appreciated.

Thanks,

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...