Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Creating start menu shortcut using Qt installer framework
Forum Updated to NodeBB v4.3 + New Features

Creating start menu shortcut using Qt installer framework

Scheduled Pinned Locked Moved Solved General and Desktop
windows 7installer
4 Posts 2 Posters 4.9k Views 1 Watching
  • 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.
  • R Offline
    R Offline
    Ratzz
    wrote on 26 Oct 2015, 13:45 last edited by Ratzz
    #1

    I am trying to create shortcut of a folder in the start menu of my application using Qt-framework installer . I have used this code in my installscript.qs i am able to get the shortcut of it in my start menu ( as shown for notepad). Is it possible to get the folder for the same using installer framework ??? (shown for notepad )

    Component.prototype.createmenuOperations = function()
    {
        component.createOperations();
    
        if (systemInfo.productType === "windows") {
            component.addOperation("CreateShortcut", "@TargetDir@/App.exe", "@StartMenuDir@/App.lnk",
                "workingDirectory=@TargetDir@", "iconPath=@TargetDir@/App.ico");
        }
    }
    

    and i have also tried

    Component.prototype.createmenuOperations = function()
    {
        component.createOperations();
    
        if (systemInfo.productType === "windows") {
            component.addOperation("CreateShortcut", "@TargetDir@", "@StartMenuDir@/App.lnk",
                "workingDirectory=@TargetDir@", "iconPath=@TargetDir@/App.ico");
        }
    }
    

    --Alles ist gut.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Ratzz
      wrote on 28 Oct 2015, 10:01 last edited by Ratzz
      #2

      I have added these to my installscript.qs which creates a folder of my application .

      Component.prototype.createOperations = function()
      {
          try {
              // call the base create operations function
              component.createOperations();
              if (installer.value("os") == "win") { 
                  try {
      component.addOperation("CreateShortcut", "@TargetDir@/App.exe", "@StartMenuDir@/App.lnk", "workingDirectory=@TargetDir@", "iconPath=@TargetDir@/App.ico");
                  } catch (e) {
                      // Do nothing if key doesn't exist
                  }
              }
          } catch (e) {
              print(e);
          
      
      		
      

      --Alles ist gut.

      K 1 Reply Last reply 9 May 2016, 15:17
      2
      • R Ratzz
        28 Oct 2015, 10:01

        I have added these to my installscript.qs which creates a folder of my application .

        Component.prototype.createOperations = function()
        {
            try {
                // call the base create operations function
                component.createOperations();
                if (installer.value("os") == "win") { 
                    try {
        component.addOperation("CreateShortcut", "@TargetDir@/App.exe", "@StartMenuDir@/App.lnk", "workingDirectory=@TargetDir@", "iconPath=@TargetDir@/App.ico");
                    } catch (e) {
                        // Do nothing if key doesn't exist
                    }
                }
            } catch (e) {
                print(e);
            
        
        		
        
        K Offline
        K Offline
        koahnig
        wrote on 9 May 2016, 15:17 last edited by koahnig 5 Sept 2016, 19:24
        #3

        @Ratzz
        Did this solve your issue?

        [edit: koahnig] Found the example in the installer framework and I am able to create shortcut now.

        Vote the answer(s) that helped you to solve your issue(s)

        R 1 Reply Last reply 10 May 2016, 05:04
        0
        • K koahnig
          9 May 2016, 15:17

          @Ratzz
          Did this solve your issue?

          [edit: koahnig] Found the example in the installer framework and I am able to create shortcut now.

          R Offline
          R Offline
          Ratzz
          wrote on 10 May 2016, 05:04 last edited by
          #4

          @koahnig
          Yes .

          --Alles ist gut.

          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