Add a Shortcut File (*.lnk) to a LabVIEW Installer

Updated Jan 11, 2023

Environment

Software

  • LabVIEW Application Builder Module

Other

LabVIEW

I would like to add a shortcut file (*.lnk) to my LabVIEW installer. However, when I add this file, LabVIEW gives it the *.exe extension instead. How do I add this file to my installer? 


When a *.lnk file is added to the Project, Windows recognizes this as a shortcut and adds the program that the link points to.  

Follow these steps to get your installer to change the .exe back to a .lnk extension:
  1. Change the file extension of this file to something other than *.lnk. 
  2. Create a batch file  for your installer that programmatically changes the shortcut extension back to .lnk .
  3. Add batch file to your project and include it in the installer in My Installer Properties>Source Files.
  4. In My Installer Properties>Advanced select the batch file to run after the installation. 
  See figures and related links for additional details on how to do this. 

 

Additional Information

This is an issue with Windows OS and this process will have to be done in any development environment.