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 Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Kevin.Shirey

Installer enhancement

Status: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.

LabVIEW Projects can use an icon in the exe, but not when running in development, and not in the built installer. 

 

Add to the LabVIEW project to have a property to set a project icon. With the Project icon, when running in development mode, it can use that icon instead of the standard LabVIEW one. Extremely useful when trying to give demos, screen shots to send to customers and building an exe is not working, feasible or designing on the fly. There is a hack you can do using the shell32.dll that on open of any LabVIEW panel, it can rewrite the icon, but then code must be added for any and every panel to show the icon. Also if the window name changes, you have to call the same code again. 

 

The installer also does not inherit the icon from the executable being installed. Add an option to add an icon to the installer and have it embedded in the setup.exe. Also include the registry setting for DisplayIcon = Icon path to exe or to defined icon. I've currently been able to change the setup.exe icon using the Resource Tuner application (www.heaventools.com for $50). It's as simple as changing the IconGroup 128 with your own icon and save the exe. This embeds the icon to show up in Windows Explorer and as the icon when running the installer.

 

The wrinkle is that the installer does not have any pointer in the Add/Remove list for Windows for the icon. You have to know the ProductID and ProductCode which changes every time you build the installer, as it is in the setup.ini file at the bottom. Going to the 32bit or 64bit registry (depending on what you are installing), you have to add a new string key "DisplayIcon" and it can point to any icon file or the exe using the path.exe,0 to represent what icon to use. The path to the reg key is somthing like HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E851D69F-49EE-4B9C-BAE7-58AB782E801A}\DisplayIcon. I'm currently developing an exe to run after the installation to set the registry key properly. It takes command line arguments for the Product Name (search registry for the GUID), path to icon/exe to set. This way each installer uses the same executable (LabVIEW built) to set the icon in the add/remove list properly. 

Kevin Shirey | CLA | Champion | Senior Project Engineer II | DMC
11 Comments
Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.