Qt Installer Framework - creating a shortcut in the Start menu for all users

with installing the installer, I would like to create an installer for my application. The application is installed by the administrator on the PC. Then the application is used by different users.

In the installer, I create shortcuts from the executable in the Start menu.

This is done in the command: installscript.js

component.addOperation("CreateShortcut", "@TargetDir@/application.exe", 
"@StartMenuDir@/Name of Application.lnk", "workingDirectory=@TargetDir@");

Now the problem is that the installer creates a shortcut in the Start menu only for the current user, for example. Administrator.

In addition, the uninstaller is displayed only for the current user. When I sign up with another user, the application does not appear on the Start menu.

How can I create a shortcut that appears in the Start menu for all users?

Many thanks.

+4
source share
1 answer

Try

component.addOperation("CreateShortcut", "@TargetDir@/application.exe", "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\<Name of Application>.lnk");

In fact, there is a variable AllUsersStartMenuProgramsPath, but I just tried it and it seems to have broken it. Links are put in C:\using it.

Like installer.value("os"), you should use installer.value("AllUsersStartMenuProgramsPath")in a script.

See the latest documentation: http://doc-snapshot.qt-project.org/qtifw-master/scripting.html

I think the error should be detected on their error tracker: https://bugreports.qt-project.org/secure/Dashboard.jspa

+1
source

Source: https://habr.com/ru/post/1546655/


All Articles