restart/logoff 使用 NSIS 后系统托盘图标不显示
System tray Icon is not displaying after restart/logoff using NSIS
当我使用 NSIS 安装应用程序时,它显示通知图标(系统托盘图标)。但是一旦 restart/logoff 图标在系统托盘中消失。
在安装时,我正在调用“部分”中具有系统托盘功能的“test.exe”。即使在 restart/logoff 之后仍显示系统托盘功能,我们是否需要在任何其他地方添加此功能?
下面是安装完成后显示系统托盘的现有代码:
!insertmacro MUI_LANGUAGE "English"
通知图标(系统托盘图标)仅在其应用程序 运行 时存在。如果您希望该图标在重新启动后仍然存在,那么您必须安排应用程序在用户登录时启动。
您可以为 the run key 添加一个值:
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "MyApplication" '"$InstDir\MyApp.exe"' ; Can also be created in HKCU
或启动快捷方式:
CreateShortcut "$SMStartup\MyApp.lnk" "$InstDir\MyApp.exe"
当我使用 NSIS 安装应用程序时,它显示通知图标(系统托盘图标)。但是一旦 restart/logoff 图标在系统托盘中消失。
在安装时,我正在调用“部分”中具有系统托盘功能的“test.exe”。即使在 restart/logoff 之后仍显示系统托盘功能,我们是否需要在任何其他地方添加此功能?
下面是安装完成后显示系统托盘的现有代码:
!insertmacro MUI_LANGUAGE "English"
通知图标(系统托盘图标)仅在其应用程序 运行 时存在。如果您希望该图标在重新启动后仍然存在,那么您必须安排应用程序在用户登录时启动。
您可以为 the run key 添加一个值:
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "MyApplication" '"$InstDir\MyApp.exe"' ; Can also be created in HKCU
或启动快捷方式:
CreateShortcut "$SMStartup\MyApp.lnk" "$InstDir\MyApp.exe"