How about a bounty for a new windows installer using inno setup ?

Jim Hewes via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 7 15:00:13 PST 2016


On 12/6/2016 10:31 PM, Thomas Mader wrote:
>
> The update case could be better supported by Inno by default though I
> don't know how to really do it transactionally/atomic. Once everything
> is on the drive, how would you be able to switch from the old directory
> to the new one with one atomic action under Windows?
>

I'm not sure what you mean by switch the directory. If you mean that the 
update uses a different directory for the program than the original, 
then you can probably just use a "major" upgrade. Windows Installer has 
the idea of minor upgrade and major upgrade. (So, it's independent of 
whatever tools your using.) A minor upgrade just updates the files that 
have changed. A major upgrade essentially removes the original product 
totally and installs the new one. Some people even use a major upgrade 
for _every_ new version just to avoid problems that might occur with a 
minor upgrade.

If your install is simple it may not matter whether it's transactional 
or not. If it fails halfway through just try again or else ask the user 
to delete files. But for a more complicated install it's possible that 
it fails halfway through and leaves the system in a bad state where the 
half-install cannot be easily removed nor can you try again because the 
installer now thinks the product is already installed. Trying to fix 
this on a remote user's system can be a headache.

I liked WiX because it was down to the metal and I don't think there's 
anything you can't do. With other tools (like InstallShield) I spent too 
much time trying to get the tool to do something I could have done 
really easy at the low level if I could've just gotten to it. But 
granted, for simpler install situations the scripting tools can work OK 
and have a smaller learning curve.

Jim


More information about the Digitalmars-d mailing list