LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding and removing files from installers

Solved!
Go to solution

Hello all,

I have a project that I am trying to deploy using an installer.  I am not having issues with the build process or necessarily the deployment, but have encountered a new and frustrating issue: I had built and deployed an installer with a file being deployed to a particular directory in the installation process.  Now, my customer wants me to not automatically deploy that file but leave the existing file in place during and installation.  However, when I remove this file from the installation package, it removes the existing file from the customer's directory during the installation process.  I am not certain I have encountered this and it only seems to delete files that were previously deployed as part of the installation process.  Does anyone have any thoughts on how to work around this?

Thanks

0 Kudos
Message 1 of 12
(3,259 Views)

Build an executable to see if the file exists and copy it to a temporary location and run it before installation. (from the Advanced page of the installer build spec.)

 

Build another executable to move it back from the temporary directory to the desired installation path if the file exists in the temporary location and run it at the end of installation. (from the installer build spec advanced tab)


"Should be" isn't "Is" -Jay
Message 2 of 12
(3,241 Views)

The advanced page provides a way to run an exe after installation and before uninstallation. After installation is too late.

0 Kudos
Message 3 of 12
(3,209 Views)

@cirrusio wrote:

The advanced page provides a way to run an exe after installation and before uninstallation. After installation is too late.


Not when the file was copied to the temporary folder before the uninstall process (which occurs when there was a previous version of the product installed)


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 12
(3,203 Views)

Not when the file was copied to the temporary folder before the uninstall process (which occurs when there was a previous version of the product installed)

 

OK - so what you are saying is that when you install over an existing installation, the uninstallation script is run first?

0 Kudos
Message 5 of 12
(3,200 Views)

@cirrusio wrote:

Not when the file was copied to the temporary folder before the uninstall process (which occurs when there was a previous version of the product installed)

 

OK - so what you are saying is that when you install over an existing installation, the uninstallation script is run first?


Yes, if the existing product was installed from an installer, rather than just copied to disk, installing updates should uninstall the installed product and update the product.

 

Of course- you used an installer right?


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 12
(3,195 Views)

Of course- you used an installer right?

See the OP above.

Message 7 of 12
(3,190 Views)

Ugh...going to trade my accept for a kudo here as this works - if the uninstallation exe exists before installation.  It appears that we have a chicken and egg problem here and I am still stuck with not being able to leave a file that was originally placed with the installer in place.

0 Kudos
Message 8 of 12
(3,121 Views)
Solution
Accepted by topic author cirrusio

OK...figured out a solution to this conundrum and that is (drum roll, please) - simply copy the existing installation project and then remove the files from the installation that I do not want to update. Ta-da!

0 Kudos
Message 9 of 12
(3,113 Views)

Its a workaround...it requires manual selection of which installer to use depending on whether you are installing new or updating existing. 

 

Personally I think that I would use the windows apps and settings to uninstall the product ( after copying the file to persist to a temp folder) on currently installations then just run the improved installer. For all cases.  No future troubles because all installations have been installed with proper uninstaller instructions. 

 

Your preuninstall exe could even offer a user option to replace existing file with factory default...a sometimes useful repair feature.


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 12
(3,081 Views)