Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt Installer Framework missing start menu icon
Pt_develop last edited by Pt_develop
My problem is straightforward. It appears in a windows 7 installation but is probably more generic. I can get the Qt Installer Framework to create an entry in the start menu by following the example provided in the documentation ([http://doc.qt.io/qtinstallerframework/qt-installer-framework-startmenu-example.html](link url)). In my case the equivalent component script code is
installer.gainAdminRights() component.addOperation("CreateShortcut", "@TargetDir@/myprogram.exe", "@StartMenuDir@/myprogram.lnk", "iconPath=@TargetDir@/images/myicon.ico", "workingDirectory=@TargetDir@");
This creates an lnk entry in the start menu with the designated icon. However it only is created for the current user. I want to create an entry that appears in every users start menu. To this end I tried:
installer.gainAdminRights() component.addOperation("CreateShortcut", "@TargetDir@/myprogram.exe", "@AllUsersStartMenuProgramsPath@/myprogram.lnk", "iconPath=@TargetDir@/images/myicon.ico", "workingDirectory=@TargetDir@");
This works except the icon no longer appears in the start menu for myprogram.lnk. I can manually create the icon but so far I have not been able to create the icon during installation.
I've searched the internet trying to solve this problem and tried various combinations of operation and Execute commands without success. Does anyone have any suggestions?
Update: I found a work around for this problem. Basically I created a desktop shortcut using addOperation then copied the shortcut to the Start Menu using a subsequent addOperation.
Tareg last edited by
saloni last edited by
@Pt_develop hi Can you share the example of what you did
How you created the desktop shortcut and copied it.