S
S
sputnickk2018-12-03 16:38:06
System administration
sputnickk, 2018-12-03 16:38:06

And how did you organize the universal updater?

Hello! There are five programs that are often updated, you need to go to each operator, of which there are many, and add updated files, in connection with this, the idea arose - a universal updater.
A program is created, for example updater.exe
A shortcut is created for the updater with the parameter of the working folder of one or another software, for example
Shortcut Program Avis object "D:\updater\updater.exe" -d:\avias\
The updater has a settings file D:\updater \updater.ini
Algorithm for launching the program from a shortcut (Shortcut Avis Program object "D:\updater\updater.exe" -d:\avias\)
1) Search in the updater settings file for paths to the program and updates for it:
updater.ini :
...
Software1Name="Avias"
Software1Path="d:\avias\"
Software1AppPath="d:\avias\start.exe"
Software1UpdatePath="\\100.125.214.43\update\avias\current\"
...
2)
Read the local version of the program: Software1Path\+updater.version
Read the version of the program on the remote server : Software1UpdatePath\+updater.version
if the versions do not match, copy from Software1UpdatePath to Software1Path
3) If the copy is successful, update the local updater.version file with the remote
one 4) message to the user - successful update
5) Start the program for work - Software1AppPath
Here is one dumb moment - if something went wrong, the network resource is not available, etc. - then the program will not start d:\avias\start.exe", since the launch is the final function of the updater. How to make d: \avias\start.exe" in any case could start, since the update is not critical, while the launch of the software is critical, they can work on non-updated software.
I see only - setting exceptions, displaying information about the error to the operator and the ability to run the software, for example: such an error, tell the admin and the button - run Software1Name without updating
The resource \\100.125. mapping.
The ini file is an example, you can of course keep both in xml and in app.config. It is planned that the updater will be universal, so that it can update about 3-5 applications. The c# language should work correctly on Win XP - Win 10
I ask the guru's advice
UPD: 1
A simpler option - a simple self-written directory synchronizer is hung up at autoload and, according to the list in the settings, makes a copy with the replacement of all files if the versions do not match (algorithm above). Those. in the morning, starting the machine, the first thing to do is to update everything, if updates are available

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pfg21, 2018-12-03
@pfg21

the simplest and most proven crutch works better than a newly written script.
the file synchronization program is taken - "thousands of them" ...
is correctly configured to clone the state to the local fs from a certain directory on the server.
configured and tested on a test image (in a virtual machine to make it easier to multiply test systems).
set to users.
update the program on the server at night - so that the user who turns on the computer in the morning has the program immediately updated.

T
TyzhSysAdmin, 2018-12-03
@POS_troi

We drive cars into the domain, we pack updates into msi packages, we roll out the update with politicians.
There is also such a thing as SCCM (System Center Configuration Manager)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question