maintenance tool start menu shortcut not recognized by Windows
-
I am using the Qt Installer Framework to create an online installer for my application. I would like to create Windows start menu shortcuts for both the application AND the maintenance tool to add/update/remove components of my application.
Both shortcuts are successfully created in C:\Users<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs<myCompany> but only the shortcut for the application appears in the Windows start menu (the shortcut for the maintenance tool does not, or if it does it is only for a very brief period of time when the app is first installed and then it is never visible again).
If I go to the AppData folder and double click either of these two shortcuts - they both work to open their respective programs just fine. But for some reason, the start menu just won't show the maintenance tool shortcut.
Below is the install script where I create both shortcuts:
Component.prototype.createOperations = function(){ component.createOperations(); if (systemInfo.productType === "windows") { // Add shortcut to start menu. component.addOperation("CreateShortcut", "@TargetDir@/x64/myApp.exe", "@StartMenuDir@/myApp.lnk", "workingDirectory=@TargetDir@/x64/", "iconPath=@TargetDir@/x64/AppIcon.ico", "iconId=0", "description=Start myApp"); // Add shortcut for maintenance tool. component.addOperation("CreateShortcut", "@TargetDir@/maintenancetool.exe", "@StartMenuDir@/myApp Maintenance.lnk", "workingDirectory=@TargetDir@", "iconPath=@TargetDir@/x64/MaintenanceIcon.ico", "iconId=0", "description=Update or remove myApp"); } }
If I manually copy the myApp.lnk shortcut and make a new one (via Windows Explorer), and change the target to the maintenancetool.exe - that DOES work and appears in the Windows Start menu. So I think I must be doing something wrong in creating it during the installation above.
Here is a screenshot of the properties of both shortcuts created by the installer. They both say they are shortcuts, but I'm also not sure why the maintenance tool shortcut properties has more tabs than the other shortcut - otherwise, they seem identical except for their targets.
Qt Installer Framework: 4.0
Qt: 5.15.2
Compiler: msvc2019 x64