Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved Qt Installer Framework missing start menu icon

    Installation and Deployment
    windows 7 installer framework start menu shortcut icon
    3
    3
    3383
    Loading More Posts
    • 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
      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.

      S 1 Reply Last reply Reply Quote 4
      • T
        Tareg last edited by

        Thanx bro

        1 Reply Last reply Reply Quote 0
        • S
          saloni @Pt_develop last edited by

          @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 Reply Quote 0
          • First post
            Last post