简体   繁体   中英

System tray Icon is not displaying after restart/logoff using NSIS

When I installed the application using NSIS it is showing the Notification Icon (System tray Icon). But once restart/logoff the icon is disappearing in the system tray.

While installing I am calling the "test.exe" that has the system tray functionality in the "Section". To display the system tray functionality even after restart/logoff, Do we need to add this functionality in any other place?

Below is my existing code that is displaying the system tray once installation has completed:

!insertmacro MUI_LANGUAGE "English" 

Notification icons (system tray icons) only exist while their application is running. If you want the icon to persist after a reboot then you must arrange for the application to start when the user logs in.

You can add a value to the run key :

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "MyApplication" '"$InstDir\MyApp.exe"' ; Can also be created in HKCU

or a startup shortcut:

CreateShortcut "$SMStartup\MyApp.lnk" "$InstDir\MyApp.exe"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM