Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt Installer Framework missing start menu icon
QtWS25 Last Chance

Qt Installer Framework missing start menu icon

Scheduled Pinned Locked Moved Solved Installation and Deployment
windows 7installerframeworkstart menushortcut icon
3 Posts 3 Posters 3.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pt_develop
    wrote on 2 Jan 2016, 21:41 last edited by Pt_develop 1 May 2016, 19:15
    #1

    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.

    S 1 Reply Last reply 9 Jun 2021, 11:01
    4
    • T Offline
      T Offline
      Tareg
      wrote on 4 May 2017, 12:11 last edited by
      #2

      Thanx bro

      1 Reply Last reply
      0
      • P Pt_develop
        2 Jan 2016, 21:41

        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.

        S Offline
        S Offline
        saloni
        wrote on 9 Jun 2021, 11:01 last edited by
        #3

        @Pt_develop hi Can you share the example of what you did
        How you created the desktop shortcut and copied it.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved