[英]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.