LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error 40 building installer in labview 2015

Solved!
Go to solution

I'm trying to compile an application in a LabVIEW 2015 SP1 project and I get the following error report during the installer build:
--------
Click the link below to visit the Application Builder support page. Use the following information as a reference:


CDK_Build_Invoke.vi.ProxyCaller >> CDK_Build_Invoke.vi >> CDK_Engine_Main.vi >> IB_MSI.lvclass:Build.vi >> IB_MSI.lvclass:Engine_BuildDevPart.vi >> CDK_Engine_AddFiles.vi >> NI_MDF.lvlib:MDFBuildDevPart_AddFile.vi
C:\Active\Development\LabVIEW stuff\Electron Gun Controller\LabVIEW\Issue 1\Default files

The following errors and warnings were recorded during the build:

Error:
Internal error.
Code:
-40

Error:
Internal installer builder component error.
Details:
An invalid destination path, "", was specified for the file "Electron Gun.ini" located in "C:\Active\Development\LabVIEW stuff\Electron Gun Controller\LabVIEW\Issue 1\Default files".
Additional details:
Error adding file: C:\Active\Development\LabVIEW stuff\Electron Gun Controller\LabVIEW\Issue 1\Default files\Electron Gun.ini
Code:
-33
----------

I recently updated my (fully updated Win 8 based) LabVIEW 2015 using "LABVIEW 2015 SP1 PLATFORM DVD SET, WINDOWS 10/8/7/VISTA/XP/SERVER,ENGLISH" P/N 501510AK-00
Prior to the update my compilation completed successfully, now it fails every time. I've made some changes to the code, but I can't see why they would cause this failure.

Now the application build completes successfully, but the installer build fails. I've tried reloading LabVIEW and also restarted my PC, all to no avail.
The file referred to exists in the stated location path. I tried inserting an explicit destination for the ini file in the installer build propoerties but it made no difference, and I can't see any other way of changing its destination path. The ini file is generated for internal use by LabVIEW so I don't expect to have to give it a destination.

The nearest I can find to my problem exists in Knowledge base report "Why Do I Get Error 40, Error 21, or Error 12 When Building a Distribution Using LabVIEW, LabWindows™/CVI™ or Teststand?" last updated on 27/01/2015, but the solution it offers is for LabVIEW 2011, not 2015. I did try the suggested solutions (replacing NI manifest xml files) but they both failed. Other related links don't seem to apply to my LabVIEW version or problem.
Attempting a compilation with an older version of LabVIEW fails as the project is defined using a newer version.

I searched the forum but the hits on "error 40 building installer" don't seem appropriate and are for older LabVIEW versions. One suggested a mass compile but I'm not sure which libraries to recompile.

Has anyone else had this problem? If so is there a fix or should I generate a service request?

Thanks in anticipation,
Tom

0 Kudos
Message 1 of 4
(3,627 Views)

Is Electron Gun.ini included into exe, or is it one of the files, added only into installer?

In the second case, try to remove it from installer, check installer builds ok, then add Electron Gun.ini to the correct location again.

If does not help, recreate installer. This advice applies to all LV and OS versions 😃

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

Thanks for your input Alexander.

 

As I understand it, every compiled LabVIEW application has a .ini file (the name has to be the same as the .exe file) located in the same folder as the .exe file. It's generated automatically by the compiler/installer and I don't think the .exe will run properly without it (not sure about that though). I certainly didn't generate it, although it does contain an entry I asked for which allows multiple instances of the app to run in the PC.

 

So basically I don't think I can remove it because the compiler will re-generate it. Besides, it was there when the previous (pre SP1) version of LabVIEW compiled it, and it was ok then. Something seems to be different with the SP1 update.

 

Tom

0 Kudos
Message 3 of 4
(3,605 Views)
Solution
Accepted by topic author LongTom

Had to go to NI Support for this one.

It turns out that somewhere in the installation of LabVIEW 2015 SP1 the properties used to build the installer became corrupted or were incorrectly interpreted by SP1, and this caused my problem.

The fix was to re-create the installer (right click "Build Specifications" in the project explorer and choose "New" then "Installer"), re-enter all the properties and then delete the old installer properties entry.

A mass compile of the project also helped speed up the build.

 

Message 4 of 4
(3,469 Views)