Archive: What is the best way to make an updater?


What is the best way to make an updater?
I've made a setup that has only one default section and a bunch of MUI2 pages. Now I want to make an update mode (command line switch '/update', updater is downloaded and launched by a program itself) that will hide all MUI pages and display only progress bar. Also updater has a completely different code so I want to make a different section for it. What is the best way to do it?


I forgot to mention that both modes share the same set of files


No need to make a different section for it. Just set a variable in .onInit if the /update parameter was passed. Then in the section use a giant if variable==update, else, endif.

1) GetParameters: http://nsis.sourceforge.net/Docs/AppendixE.html#E.1.11
2) Download plugin such as inetc.
3) Skip pages by calling abort in their prefunctions.

Edit: No need to worry about files being the same for both types - NSIS will only compress one copy of a file, even if you File it several times.


Is there a command to turn off MUI i.e. switch to default UI with progress bar only?


No, the interface is hard-coded in the installer exe as far as I know. There are several threads about popup windows etc. But why not just use a MUI page?