06-12-2019 06:47 PM
Sorry, I have a hard time understanding how to built and use packages.
Scenario:
Thanks!
06-12-2019 06:56 PM - edited 06-12-2019 07:11 PM
Ah, OK. It actually is in the NIPM under "installed" if I uncheck "products only". The old version shows even if "products only is checked", i.e. at the default. I guess I don't know the definition of product. 😉
(Hey, there is even a package building checkbox to show it when "products" is selected. Why is it not checked by default?)
06-13-2019 10:28 AM - edited 06-13-2019 10:29 AM
I guess I start liking the package method (:D), so I have a few questions:
06-17-2019 01:53 PM
Hi altenbach,
Regarding number 1, technically yes you can force the uninstall of a LabVIEW 2015-built distribution through the installation of a package by using a Conflicts relationship specifying the upgrade code. For example:
Conflicts: 5581b2cc-fdfc-4084-9a02-7e453276dda7
At install time of the new package, you will see a screen similar to the one below indicating that the old software will be removed if you proceed:
However, as far as I'm aware, none of the package builders (e.g. LabVIEW Application Builder package build spec, NI Package Builder) currently expose this specific relationship through their UI. So if you want to do this, you will need to modify the control file manually and then pack the package manually via the NIPM CLI. Perhaps one way to do this more easily and possibly programmatically would be to build the package in LabVIEW, then use the NIPM CLI to unpack the package, modify the control file, and then repack the package via the NIPM CLI again.
Regarding number 2, I think technically there should be a way to do this, but as I was trying to test this out before posting this I wasn't able to get it to work. I'm going to keep working on it and asking around and will post back if/when I find out more.
Regarding number 3, if you choose not to build a package installer, then your end-user will need to acquire and install NI Package Manager separately. They can download it from ni.com (https://www.ni.com/en-us/support/downloads/software-products/download.package-manager.html#306124) and I don't believe it requires an NI User Account (it didn't prompt me to log in when I just tried).
Regarding number 4, are you referring to uninstalling NI Package Manager or the package(s) that you give them?
Regarding number 5, hmm... 42?
06-17-2019 03:07 PM
@APena wrote:
Regarding number 4, are you referring to uninstalling NI Package Manager or the package(s) that you give them?
Thanks for you comments!
I guess my problem is related to my first post (Not following any instructions (point 5 :D), but following typical procedures).
Let's assume they don't have any existing NI software and want to uninstall whatever they put on minutes earlier because they don't like me or my programs.
The start menu has an "uninstall" right-click item added by windows 10, so most might start there. Clicking this opens the software control panel and my app is nowhere to be seen and nothing happens. They might think that NIPM relates to it and uninstall that instead (Yes, there will be warnings, but if they ignore them, my software will probably be stuck there forever. ;D!)
Maybe this is something that could be better implemented in windows 10 such that if I click "uninstall", NIPM would open instead. Not sure if that's even possible.
I guess they would need to open NIPM, uninstall everything, them uninstall NIPM as a last step.
I'll probably skip the step 1 discussion and have them uninstall the old version or keep both, making sure there are no naming conflicts.
06-19-2019 10:34 AM
I haven't tried this, but I was wondering if you could use a custom action to manually add your own option to Add\Remove software and set the UninstallString to use the nipkg.exe command-line to uninstall your package.
https://nsis.sourceforge.io/Add_uninstall_information_to_Add/Remove_Programs
09-21-2020 10:12 AM - edited 09-21-2020 10:12 AM
@APena a écrit :
Regarding number 1, technically yes you can force the uninstall of a LabVIEW 2015-built distribution through the installation of a package by using a Conflicts relationship specifying the upgrade code. For example:
Conflicts: 5581b2cc-fdfc-4084-9a02-7e453276dda7At install time of the new package, you will see a screen similar to the one below indicating that the old software will be removed if you proceed:
Hello,
This is exactly the function I need. I managed to build (with NIPM CLI) a new package with "conflicts" and "replaces" relationships to an older non-package software.
But the package still doesn't detect the older software. I don't see anything like your screenshot.
I tried the product code and the upgrade code of the older software.
Are you sure that NIPM supports product/upgrade codes? I see only package names in relationship examples.
09-23-2020 06:45 PM - edited 09-23-2020 06:47 PM
Yes, you should be able to do this in NIPM, and is actually how NI has authored its own NIPM packages to upgrade anything from the old installer technology. What happens behind the scenes is that NIPM knows how to discover all of these old installers once installed, and reports them as if they were installed as packages. It does this by mapping the MSI properties to NIPM attributes. So, the original MSI's UpgradeCode, ProductVersion, and ProductName becomes the NIPM Package name, Version, and DisplayName, respectively.
Here's a suggested procedure how to use this to create a seamless upgrade:
That last step might need some explanation. Using Conflicts\Replaces together is a "recipe" that says that if you find a matching package name and version, then have this new package be treated as an upgrade of what matches. So, this will allow the package to upgrade the old pre-package installer.
05-19-2021 02:41 AM
@APena wrote:
Regarding number 2, I think technically there should be a way to do this, but as I was trying to test this out before posting this I wasn't able to get it to work. I'm going to keep working on it and asking around and will post back if/when I find out more.
Hello Aaron,
Do you have any updates regarding this? Can I somehow deal with this using nipkg.exe install
command.?