LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create installer that copy files only if they are newer

I have an application with a couple of configuration files that are modified for each machine they are installed on. How do I build an installer with the LabVIEW 8.0 application builder that only overwrites these files if they are newer than those currently on the system?
0 Kudos
Message 1 of 5
(3,946 Views)

Ksmith,

Unfortunately the installer will not be able to overwrite files without user interaction. Basically this is how it works. When you create an installer it is actually a MSI file that will run with a product code. The installer checks the code vs any other codes and if the code already exists, it will prompt to un-install. If you have different product codes for the same exe but different versions, I am not 100% sure it will allow you to install in the files in the same place, however, if it does when the installer tries to overwrite a file, Windows is smart enough to ask if you want to replace. If you select yes to all it won't check versions. However, you can go through files one at a time and choose. This is a limitation of using the MSI installer, however it is the best installer for windows based applications. Let me know what you come up with.

Tyler H.

National Instruments

0 Kudos
Message 2 of 5
(3,935 Views)
Hi Tyler
 
Just today I reinstalled an application but there was neither a "do you want to uninstall the previous installation" nor a "do you want to overwrite file x".
All existing config-files (like *.dsn, *.xml, ...) were overwritten.
Last week I also reinstalled this application without checking for overwritten files - this caused the program to write data into the wrong database.
 
Is there really no way to change this behaviour? Because if I make a SW improvement, let's say something like a bugfix, I just want to reinstall the exe but keep all the other files. Now I can't do this - I have to copy all the settings to a different folder and copy them back after the reinstall.
 
If msi is the best installer for windows, well that's another topic, but for my other applications I use Inno Setup (http://www.jrsoftware.org/isinfo.php) since a few months. There I can specify how the installer should handle already existing files.
I wished such a feature was available in the LV installer.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 3 of 5
(3,836 Views)
My work around for this situation was to create two installers, one for clean installations and one for updates.
0 Kudos
Message 4 of 5
(3,834 Views)

Well - that's not really comfortable, if you have to maintain several build specifications.

Can we expect an improvement regarding this topic in a future LV version?

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 5 of 5
(3,831 Views)