0
votes

i have already an installer for our application. but it is exe-file. it was created many years ago.. application of course was updated. we used a bat-file to register new dll-files and to install our service(windows). but we want to do all this by installer not a bat-file. we chosen a wix techology. i read about <Patch> node, but to use it i need an msi from previous version.. i think to do a simple installer, that will stop service,copy and register dll in the installed application's directory, install service. but i don't know will it overwrite the files without any problems?

2
You can try creating a complete MSI for the new version which uninstalls the old EXE package before installing. This way you can start patching the MSI in the future.rmrrm

2 Answers

2
votes

You can only create an MSP (Patch) for an MSI (Installer). Also, you're going to run into component ref counting problems if you install your components into the same directory as the original install. The problem is MSI will go to see a file is already there, make it as a shared resource and increment the usage counters. Then on uninstall it will decrement, see that it's not 0 and remove to uninstall the files.

I'd suggest installing to a new directory and then using the RemoveFile table to get rid of the old files. Also I'd suggest following good CM / Versioning practices so that you don't have to worry about hacks such as Version Lying.

If all your application just needs to xcopy files, setup a directory and maybe even a ShortCut, it should be a piece of cake.

0
votes

Versioned files like executables will automatically be overwritten if the version of the file number is lower.

See also Copy if not exist in WiX.