I'm running my program from the Task Scheduler using the ONLOGON trigger, so that it runs on startup. My program is starting minimized and an icon is being added to the SysTray using Shell_NotifyIcon()
This normally works fine, but I've noticed a strange bug. If jucheck.exe runs in order to do an update on startup, then afterwards my systray icon does not appear.
Shell_NotifyIcon() is returning FALSE with a GetLastError() error code of 0. As a work-around I have put it in a for loop with a Sleep() delay.
Has anyone encountered this, or have any ideas on what might be causing the problem?