Skip to content

HostTray 1.0.0

Choose a tag to compare

@alex-286 alex-286 released this 01 Dec 18:15
· 1 commit to main since this release

The first public version.

Waking

  • Wakes devices on the local network (a NAS, server or PC) with Wake-on-LAN: double-click the tray icon, use hosttray.exe /wake, or a desktop shortcut.
  • Broadcast address, UDP port and number of packets can be set.

Several devices

  • Up to 9 devices ([Host1] to [Host9]), each with its own wake settings, commands and online status.
  • With more than one, the tray menu has a submenu per device: its icon, status line, Wake and its commands. Double-click and the tray icon belong to the first device; the tooltip lists the online state of each.
  • /host <number or name> picks the device for /wake and /run; without it, the first device.
  • A mistake in one device's wake settings only shows when you wake that device.

Online status

  • With the device's host name or IP address set (Address=), HostTray pings it every 30 seconds: the tooltip and the first line of the tray menu say whether it is online, and the tray icon is grey while it is off (GreyWhenOffline=).
  • After waking, HostTray waits until the device answers and says so ("NAS is online"), or tells you when it didn't answer within OnlineWait= seconds. /wake then exits with 0 or 1, so scripts can rely on it.
  • The ping runs inside HostTray, without a console window, on every Windows from 98 to 11.

Commands

  • Up to 9 commands of your own for the device, e.g. Shut down, HDD sleep or HDD wake-up, typically over SSH. They appear in the tray menu and run with /run <number> or /run "<name>".
  • Each command can ask before running, runs hidden with a timeout (or in a window with Window=1), and shows the end of its output when it finishes or fails.
  • {remote} puts the common start of the device's commands (e.g. the ssh call) into each command line; environment variables like %SystemRoot% work too.
  • Umlauts and other special characters in the output show correctly, whether it comes from Windows console programs or as UTF-8 from a NAS. Encoding= sets it by hand where needed.
  • /silent runs /wake or /run without confirmation, popups or messages, e.g. for scheduled tasks.
  • Exit codes for scripts: 0 = done, 1 = failed, 2 = cancelled by the user.

Tray and look

  • Starts in the notification area by default; Start with Windows in the menu.
  • Self-closing popups for results, errors as message boxes.
  • Device icons for the tray and popups: monitor (PC), NAS and server.
  • 14 menu icons for the commands, e.g. shutdown, restart, sleep, ping, terminal or web.
  • Icons have smooth edges on Windows 98 and 2000 too.
  • Sharp on screens with 125 %, 150 % or more scaling: text, icons and spacing are drawn for the screen instead of being enlarged by Windows.
  • About HostTray shows the version, the licence and where the settings file is.

Settings

  • All settings in one commented file, hosttray.ini, next to the exe. It is created on the first start and opened in the editor; changes take effect without a restart.
  • Complete examples for a Synology NAS, from Windows 10/11 with ssh and from Windows 98 with plink.exe.

Compatibility

  • Runs on Windows 98 through Windows 11. One file, hosttray.exe, no installation, no runtime DLLs.
  • Should also start on Windows 95 (untested; the menu has no icons there).
  • Released under the MIT License.