Skip to content
⌘ NSIS Forum Archive

Tray icon

113 posts

rmccue#
Still doesn't work
I have extracted to C:\icon.ico
but still doesn't work
Using
NotifyIcon::Icon /NOUNLOAD "fpb" "C:\icon.ico" "START" "Balloon!" "Cool!"
rmccue#
When you use this in conjuction with wansis, the skin window stays up.
Is there a way to fix this???
stevelam#
Originally posted by rmccue
When you use this in conjuction with wansis, the skin window stays up.
Is there a way to fix this???
Hey rmccue I knew it would be you when I saw the topic title on the NSIS homepage!
BioDuo#
My program notfies the user if something happens and displays it in a balloon (yeah,.. really! :P)

But I want that if the user click on the balloon a certain action is performed, how do I do that?
Mr Inches#
So I wonder how that (annoying) "Take the Windows Tour" balloon and the "Windows Update" ballon do it then, they launch Wizards/applications when you click on them...

I think this is the functionality that is sought.

I might take a look, it would be interesting to know its done.

Duncan
Afrow UK#
There is no way via a run-time plugin to call an internal NSIS function from some event. For this to be possible we'd need modifications to the original NSIS source code, or perhaps when compiler plugin support is added this will be possible. I doubt it will get implemented because this would add to installer overhead no doubt.

-Stu
kichik#
Actually, you can already call NSIS functions from plug-ins. ExecuteCodeSegment is exported to plug-ins through the extra_parameters structure passed on as the fifth function argument. However, the scripting engine is not multi-threaded, so it's up to the plug-in to synchronize it.
rmccue#
Anyway, how would I get it to shrink the wansis window? I'm using FindWindow, ShowWindow in a custom function.
zeeh3#
I need some help here... the plugin doesn't allow me to HideWindow and I can't get "p" nor "!p" params to work with the NotifyIcon.nsi that comes in zip file (v0.2).
Alfaromeo#
I need to show the system tray icon during an upgrade process. The upgrade will be triggered using the silent switch to make it silent.
Is this feasible using the NotifyIcon plugin ? If not what are my options.
Afrow UK#
It's been a while since I looked at the code but it probably doesn't show any notification icon if the installer is silent. If that is the case you would need to modify the plugin to allow a force show option or something that overrides this behaviour. If you don't use the plugin you'll be using System with a lot of SendMessage lines (which the Win32 macros use internally) so it'd be pretty painful.

Stu
Alfaromeo#
Yes it is a nice switch to have because on silent , this can be a kind of notification to the user .
I'm surely in dire need of this.
JasonFriday13#
So I've uploaded a new version to the wiki: http://nsis.sourceforge.net/NotifyIcon_plug-in.

It has both ansi and unicode versions included, plus tweaks to the code so that it runs on x64 (yes, I did test the x64 build 😁 ).

Enjoy 😎.
JasonFriday13#
So I've made another update, details:

v0.4, Removed msvcr*.dll dependency, extra tweaks to unloading code.

Available at: http://nsis.sourceforge.net/NotifyIcon_plug-in.
Marshallx7#edited
There is an issue with the plugin when the installer is launched with a different SW_ value, for example, when I launch the installer with SW_SHOWMINNOACTIVE and call NotifyIcon::Icon during onGUIInit or first page show the installer does not start minimized but instead starts visible.
This is because NotifyIcon calls ShowWindow, which discards the startup SW_ value.

As far as I can tell, NotifyIcon needs to call ShowWindow to affect the taskbar icon.
However, NSIS doesn't call ShowWindow until after onGUIInit, so startup value is not processed until then.

My C++ knowledge is limited, so I don't know whether or not there is a way to postpone calling ShowWindow, or if this is a feature that NSIS must provide.

EDIT: I think this maybe solely an NSIS limitation. See