How can I update the application over the network in .NET?

I need to install some .NET software on multiple PCs.

This software must be checked at each restart to see if a newer version exists on the server.

End users will have basic user rights and therefore cannot copy files to the Program Files directory.

If a newer version exists, the application closes, the updater copies the file from the server, and then restarts the application.

However, I wanted to create my own updater, so it will be application independent. That is, I sent an update identifier to indicate which application will be updated.

Then I wanted it to still work if the file server name was changed.

I think I can do all this using the service, with administrator privileges, to copy files.

  • Is there a class that does this?
  • Am I on the right track when I think about using an installed service?
+4
source share
4 answers

The .NET Framework has a built-in clickonce function that does exactly what you want.

+7
source

Check out ClickOnce deployment . It covers almost everything you requested. He does not update the application by identifier, but he is sure that every application is updated to date, without having to write an update code for each application. And it will not automatically handle changes to the file server name, but you can specify your links as necessary.

+2
source
+1
source

1) Depends on the version of .NET used. > = 2.0. You can deploy smart applications that can check the network path for the updated version, and then update if necessary.

2) If you are stuck in 1.1 (like me :-(), either the service or the scheduled task that starts when you log in will work fine, what we do here. We keep several DB tables that track which has the most latest version of what.

-ian

0
source

Source: https://habr.com/ru/post/1277288/


All Articles