Developer Center Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Licensing and Installer for complex Toolkit's

If you install files to locations outside of the LabVIEW tree, VIPB will create two packages out of your toolkit, with the second being a System Dependency package. This package is responsible for all files that go into the OS folders, such as ProgramFiles or Windows\System32. If this package is installing those files, then the primary package will not necessarily be aware of them and therefore it doesn't return them in the "Files Installed" variant.

As a workaround, could you install the executable files to a [LabVIEW]/ path, then in your custom VI it will be returned as an installed file. You can then move the file to the true destination [ProgramFiles]/..., and then create your shortcut?

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 11 of 20
(3,568 Views)

The reason is because any files installed outside labview are considered system files. They are placed in a package called a system package. This package is extracted from the main package and is installed as a dependency of the main package. So actually, you are installing 2 packages. The main package and the system package. The pre and post VIs are only executed on the main package, not the system package. This is why they exe file is not listed.

So this could be considered a bug, but you are the first person to report it. So yay you! Now that I think about it. It will be a difficult issue to fix. But not impossible.

Two possible workarounds:

1: Figure out where the exe is installed some other way. Possibly with a file search. It could only be in a handfull of locations since you set the destination in VI Package Builder and the end-user cannot change this.

2:Instead of letting VIPM install the EXE (by using the system package feature), Pick the destination for your exe into labview. Then with a post-install VI copy the exe to the correct destination and then create the short cut. The copy and shortcut actions could potentially be bundled into an exe, but primitive LV functions should work as well.

0 Kudos
Message 12 of 20
(3,568 Views)

Ok, thanks. Well, if I have to do a workaround then I will go for the Workaround 1 in Michaels proposal. Our EXE are always installed to [ProgramFiles]\MyCompanyName so it’s quite easy to find the path/filename.

0 Kudos
Message 13 of 20
(3,568 Views)

Sorry for all my posts, but there are more problems....

During Uninstall, I was planning to use the Pre-Uninstall Action were a VI will search [ProgramFiles]\MyCompanyName and delete corresponding shortcut file(s). The problem is that VIPM does not wait for the Pre-Uninstall VI to finish, i.e. it just calls the VI and then it deletes the *.exe file before the Pre-Uninstall VI was able to find it. Since the Pre-Uninstall VI just finds an empty folder it does not delete my shortcut. So, is there a way to freeze the VIPM Uninstall feature until my Pre-Uninstall VI has finished?

I do not want to hardcode the shortcut file name(s) since it will be different numbers of them and with different names in future Toolkits from us.

PS. I'll be gone for a couple of days now so you will not see any more posts from me in a while

0 Kudos
Message 14 of 20
(3,568 Views)

I'm confused. If you are deleting a shortcut, and VIPM is deleting the exe (as it should), don't you want to be searching the start menu folder for your shortcut and deleting that?

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 15 of 20
(3,568 Views)

In my last post I was trying to delete shortcuts from the Desktop and was not using the Start Menu at all. As a workaround to the problem described in last post I am now also creating/deleting shortcuts in the StartMenu i.e. it’s now possible to remove our shortcuts during Uninstall. It will however be a bit messy when we have several Toolkits with several shortcuts in the same MyCompanyName folder and is about to uninstall just one Toolkit (i.e some of the shortcuts). This would have been much simpler/better if the Pre and Post VI’s could include the system package…

Another comment regarding the Pre-Uninstall VI: It has a variant attribute “Files Uninstalled” and I was expecting it to contain the files to Uninstall, but it’s always empty. The Post-Uninstall VI has the same “Files Uninstalled” variant, and that one is filled with uninstalled files from the main package. I don’t see the point of having a variant attribute that always is empty in the Pre-Uninstall action. Yes, I understand that “Files Uninstalled” should be empty in a Pre-Uninstall VI, since no file is Uninstalled yet, but I was expecting it to contain files “To Uninstall”. I'm just telling you all so that you know, perhaps it will save some time for someone...

0 Kudos
Message 16 of 20
(3,568 Views)

Thanks for the feedback. This is something to add to our list of issues we need to address.

0 Kudos
Message 17 of 20
(3,568 Views)

Oh noooo.... Another problem:

I have a couple of *.lvbitx and a couple of *.lvlibp  files with the destination folder [ProgramFiles]\National Instruments\NI VST\Custom Bifiles.The problem is that while running the installation the *.lvlibp files are not copied to the destination. If I rename my *.lvlibp files to *.txt   or similar and rebuild my package in VIPB I can see that my *.vip file are bigger and the files are correctly copied to destination. So the question is WHY the VIPB ignores including files with the file extension *.lvlibp.

0 Kudos
Message 18 of 20
(3,568 Views)

gunnar.andersson wrote:

Another comment regarding the Pre-Uninstall VI: It has a variant attribute “Files Uninstalled” and I was expecting it to contain the files to Uninstall, but it’s always empty. The Post-Uninstall VI has the same “Files Uninstalled” variant, and that one is filled with uninstalled files from the main package. I don’t see the point of having a variant attribute that always is empty in the Pre-Uninstall action. Yes, I understand that “Files Uninstalled” should be empty in a Pre-Uninstall VI, since no file is Uninstalled yet, but I was expecting it to contain files “To Uninstall”. I'm just telling you all so that you know, perhaps it will save some time for someone...

Just want to let you know we are adding 2 new parameters available through the variant. You now have access to: 'Files to Uninstall' and 'Folders to Uninstall'. This will be available in VIPM 2014.

0 Kudos
Message 19 of 20
(3,568 Views)

gunnar.andersson wrote:

I have a couple of *.lvbitx and a couple of *.lvlibp  files with the destination folder [ProgramFiles]\National Instruments\NI VST\Custom Bifiles.The problem is that while running the installation the *.lvlibp files are not copied to the destination. If I rename my *.lvlibp files to *.txt   or similar and rebuild my package in VIPB I can see that my *.vip file are bigger and the files are correctly copied to destination. So the question is WHY the VIPB ignores including files with the file extension *.lvlibp.

I just wanted to say that we've fixed this issue now in VIPM 2014.

0 Kudos
Message 20 of 20
(3,568 Views)