Benjamin R Posted November 5, 2021 Report Posted November 5, 2021 (edited) Hi everyone, I'm implementing a tool to create brand new project based on a custom project framework that include LV code and build specifications. After cloning and setting anything up and running, I need to find a way to update the installer UpgradeCodes of the installer build specifications defined in my project. I've tried some VIs from the AppBuilder or InstallerBuilder APIs (..\vi.lib\AppBuilder API and ..\vi.lib\InstallerBuilder) but nothing seems to let me change the UpgradeCode of an installer build specifications. Does anyone know if there is a way to do so? Edited November 5, 2021 by Benjamin R Quote
hooovahh Posted November 5, 2021 Report Posted November 5, 2021 I don't know of a utility for doing this. But the Upgrade Code can be found as a string property in the .lvproj file. Just open it is a text editor and you can search for it. I think it is called the "MSI_upgradeCode". Quote
Benjamin R Posted November 9, 2021 Author Report Posted November 9, 2021 Thanks @hooovahh for your answer. My concern is more about how to generate a new UpgradeCode as you can do it from the Installer property window. Is there any LabVIEW or Windows function that I can call to get a brand new oneÉ Quote
JKSH Posted November 10, 2021 Report Posted November 10, 2021 2 hours ago, Benjamin R said: Is there any LabVIEW or Windows function that I can call to get a brand new one If I'm not mistaken, the Upgrade Code is simply a GUID: https://stackoverflow.com/questions/4313422/generate-guid-in-windows-with-batch-file 1 Quote
hooovahh Posted November 10, 2021 Report Posted November 10, 2021 Oh sorry, here is a VI I made a while ago for generating a GUID. It might need to be modified for the pattern you need. Generate GUID.vi Quote
Darren Posted November 10, 2021 Report Posted November 10, 2021 There's also the Create NI GUID.vi in LabVIEW 2020 and later. Quote
hooovahh Posted November 10, 2021 Report Posted November 10, 2021 1 hour ago, Darren said: There's also the Create NI GUID.vi in LabVIEW 2020 and later. Is there a good reason that this is password protected? Other than it probably is a single call library node to some internal function? Quote
Darren Posted November 10, 2021 Report Posted November 10, 2021 21 minutes ago, hooovahh said: Is there a good reason that this is password protected? It calls a private internal method, yeah. NI policy is that VIs that call private properties/methods/events are password-protected. 1 Quote
Benjamin R Posted November 13, 2021 Author Report Posted November 13, 2021 Thanks for your really helpful answers, pointing me to the right place. Quote
Rolf Kalbermatter Posted November 14, 2021 Report Posted November 14, 2021 The private method is also available in earlier LabVIEW versions, although not as a VI in vi.lib. I checked for it in 2018 and 8.6 but suspect that it may have been present as early as 8.2 0r even 8.0. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.