Well, there are two usage cases that I can think of.
------------------------------------------------------------------------------------- 1. Have two copies of the same App on the same machine.-------------------------------------------------------------------------------------The first is what I described above - that a user might want two separate copies of my application on his machine. This may be because the two applications are configured differently, running different profiles, or that the user wants to test every update to make sure it runs without problems, and so he keeps another copy installed at a different location for 'roll-back' purposes.
This is the way we are doing things in my company. An example:We have two copies of the application installed at two locations:Copy 1 at C:\Program Files\Test AppCopy 2 at C:\Program Files\Main App
Now, when I push an update, the user can first run the test app to make sure there are no problems, bugs etc - and once he/she is sure of that, then he/she can run the Main App - this prevents roll backs and is an enterprise requirement for me.
------------------------------------------------------------------------------------- 2. Have two or more Apps using the same Updater-------------------------------------------------------------------------------------The second usage scenario is a little unusual. There are a lot of applications used internally in my company. Most of these applications are not developed by me, but I have to keep them up to date for the Middle East and Africa region. The developers of the applications are at various locations around the world, and there is a lot of legacy code so it is difficult to implement wyUpdate directly into the Apps.
What I have done is to develop a single App which uses wyUpdate, and reads the following information from an INI file:1. Application Name2. SQL Server Name/IP3. Name of EXE to execute
Now, my 'Updater' queries the SQL server and dynamically gets the location of the .WYU file and the .WYS file based on it's own COMPUTER Name and the Application Name. It passes this information on to WYUpdate.exe as commandline switches.
Instead of having shortcuts pointing to the applications themselves, I have pointed all the shortcuts to my application instead. Now, when a user runs App1, my updater gets launched instead. It checks for updates, and if it finds some, then it updates the app. If it doesn't find updates, it launches App1.exe instead.
Other than just launching App1.exe, it updates a table in SQL server with the Computer Name, Application Name, Latest Update Version and Any Update Errors, and The file version of the Exe file.
The same can be done with App2, App3 etc by simply modifying the INI file.
This way, I have a single Generic Updater for all the applications that I have not developed, and which need to be updated for the computers for which I am responsible. And this way, I can get feedback on which computer is at which version of which app at the moment. This is working perfectly for my needs.
The only problem is that some computers have multiple different applications running on them - so even though in theory, my generic Updater should work for all the Apps, it can not - because of the Cache file conflict.
To solve this, every time I make any change to the Updater, I recompile it several times, with different GUIDs - one for each of the Apps that it needs to update.
---------------------------------------------------
I know the second usage case is a rare/extreme one, but it is quite useful - and the only downside is having multiple re-compilations of my Updater every time I need to update it.