[英]Installed NSIS application is not shown in start menu/system tray for other users (non admin users)
我已经使用具有管理权限的 NSIS 安装了一个应用程序。 然后切换到普通用户(没有管理权限)启动应用程序。 但在这里我没有看到开始菜单和系统托盘。
下面是我使用的代码片段:
RequestExecutionLevel admin
; To show the system tray notification
ExecShell "" "$INSTDIR\test.exe"
; To show the installer icon at the start menu
createDirectory "$SMPROGRAMS\${COMPANYNAME}"
createShortCut "$SMPROGRAMS\${COMPANYNAME}\${APPNAME}.lnk" "$INSTDIR\Myapp.exe" "" "$INSTDIR\test.ico"
我只需要在安装安装程序而不是启动应用程序时检查管理员用户。
请帮助我提供为普通用户显示开始菜单和系统托盘所需的更改。
使用SetShellVarContext
将常量切换到“所有用户”/机器模式:
RequestExecutionLevel Admin
Function .onInit
SetShellVarContext All
FunctionEnd
Section
CreateShortcut "$SMPrograms\Test.lnk" "$SysDir\Notepad.exe" ; Created in the shared startmenu folder
SectionEnd
如果您希望应用程序在用户登录时启动,请在 Startup 文件夹或 Run 注册表项中创建快捷方式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.