From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Installer only deletes existing exe

Hi,

For my LabVIEW application I am building two installers:

1) For initial release which includes LabVIEW Run-Time and two other additional drivers

2) For patch updates that doesn't include any drivers.

 

I am using the same Upgrade Code for both installers, I made a direct copy of the initial project.

I am also changing the version number of both the installer and exe.

I want the patch installer to overwrite the existing software. 

However when I run the patch installer it just deletes the existing exe, and doesn't touch any of the other files. If I run the patch installer without the existing software installed it installs correctly. 

 

The only other change I made to the installer properties was to remove an exe called setup.exe from the Source Files which runs after the installer for the software and it installs the additional drivers.

 

Any input would be appreciated.

 

Regards,
Cathal.

0 Kudos
Message 1 of 4
(2,466 Views)

It identifies installed product on Product information -> Product name and Version information -> Upgrade code determines what to do during upgrade

"Upgrade code—Specifies the upgrade code that Windows uses to identify the installer. If you duplicate an installer and you do not want the new installer to replace the previous version, generate a new upgrade code. If you want the installer to upgrade, do not change the upgrade code"

One more thing, do you include your exe as build from the same project, or do you include all files manually? First approach worked for me in your situation (one installer with NI drivers + MyApp, and small installer just for MyApp).

 

0 Kudos
Message 2 of 4
(2,438 Views)

Yes I include the exe as build from same project.

0 Kudos
Message 3 of 4
(2,397 Views)

I know this is way too late to be useful, but it might help someone else

 

If the exe in your upgrade installer has an earlier version number than the existing exe, the existing exe will be removed when you run the installer.  If you try to run the installer a second time it will refuse to change anything, saying there's an existing installation that's newer - obviously it should do this the first time you run it instead of deleting anything.

 

I don't think this used to happen in older versions of LabVIEW, but it's definitely there in 2018

 

One way to prevent this from happening is to build the full installer once with a fixed exe version like 1.00 and then incrementing the version for the upgrade installer whenever you release a new exe.  You can avoid having to update the full installer by always running the upgrade installer after using it

 

Cheers
Brett

Senior Software Development Engineer
Certified LabVIEW Architect and LabVIEW Champion
https://theLonelyAnt.com


0 Kudos
Message 4 of 4
(1,386 Views)