What is the Tray Application?
The tray app is a lightweight Windows application that:- Displays the WorkerService status in real-time
- Allows starting and stopping the WorkerService process
- Provides quick access to the APM UI
- Runs on Windows startup (optional)
- Lives in the system tray (notification area)
Starting the Tray Application
Launch TrayApp.exe
Navigate to your APM installation directory and run
TrayApp.exe.Default location: C:\Program Files\AppsielPrintManager\trayapp\TrayApp.exeFind the Tray Icon
Look for the APM icon in your Windows system tray (bottom-right corner of screen).If hidden, click the ^ arrow to show hidden icons.
Tray Menu Options
Right-click the tray icon to access:| Menu Item | Description |
|---|---|
| Abrir UI | Opens the APM user interface application |
| Estado: [Status] | Displays current WorkerService status (read-only) |
| Iniciar WorkerService | Starts the WorkerService process |
| Detener WorkerService | Stops the WorkerService process |
| Salir | Exits the tray app and stops WorkerService |
WorkerService Status Indicators
The status menu item shows the current state:- En Ejecución
- Detenido
- Desconocido
Status: Running ✓
Icon: Green indicatorThe WorkerService is active and processing print jobs.Available actions:
Icon: Green indicatorThe WorkerService is active and processing print jobs.Available actions:
- Detener WorkerService (enabled)
- Iniciar WorkerService (disabled)
The status updates automatically every 1 second to reflect the current state.
Using the Tray Application
Opening the UI
Starting the WorkerService
The WorkerService will:
- Start as a background process
- Begin listening for print jobs
- Connect to configured printers and scales
- Run without a visible window
Stopping the WorkerService
Exiting the Tray Application
Exiting the tray app does NOT uninstall APM - it simply stops the current session.
Automatic Startup
To run the tray app automatically when Windows starts:Set Target
Browse to
TrayApp.exe in your APM installation directory.Example: C:\Program Files\AppsielPrintManager\trayapp\TrayApp.exeHow the Tray App Works
The tray application uses the following logic to manage services:WorkerService Discovery
The app searches forWorkerService.exe in:
- Production path:
../worker/WorkerService.exe(relative to tray app) - Development paths: Various
bin/Debugandbin/Releasefolders
UI Discovery
The app searches forUI.exe in:
- Production path:
../UI.exe(relative to tray app) - Development paths: Various
bin/Debugandbin/Releasefolders
Status Monitoring
Every 1 second, the tray app:- Checks if
WorkerService.exeprocess is running - Optionally checks Windows Service status (if installed as service)
- Updates menu status and icon
- Enables/disables menu items accordingly
Troubleshooting
Tray icon not appearing
Tray icon not appearing
- Check if TrayApp.exe is running in Task Manager
- Look in hidden icons (click ^ in system tray)
- Restart TrayApp.exe with administrator privileges
- Check Windows notification settings allow tray icons
WorkerService won't start
WorkerService won't start
- Verify WorkerService.exe exists in the expected path
- Check for error messages in the tray app popup
- Ensure no other instance is already running (check Task Manager)
- Try running WorkerService.exe directly to see detailed errors
UI won't open
UI won't open
- Verify UI.exe exists in the expected path
- Check if UI is already running (only one instance allowed)
- Ensure .NET runtime is installed for MAUI applications
- Check Windows Event Viewer for application errors
Status always shows 'Desconocido'
Status always shows 'Desconocido'
- The tray app may not have permission to query process status
- Run TrayApp.exe as administrator
- Check if Windows Service controller is accessible
Tray app exits on startup
Tray app exits on startup
- Check for error dialogs that appear briefly
- Run from Command Prompt to see console errors
- Verify all required DLLs are present
- Check Application Event Log for crash details
Files and Locations
| File | Purpose | Default Location |
|---|---|---|
TrayApp.exe | Main tray application | C:\Program Files\AppsielPrintManager\trayapp\ |
apmtrayicon.ico | Tray icon graphic | C:\Program Files\AppsielPrintManager\trayapp\Resources\ |
WorkerService.exe | Background service | C:\Program Files\AppsielPrintManager\worker\ |
UI.exe | MAUI user interface | C:\Program Files\AppsielPrintManager\ |
Technical Details
Implementation
- Platform: .NET 10 WPF (Windows-only)
- Tray Framework:
System.Windows.Forms.NotifyIcon - Process Management:
System.Diagnostics.Process - Service Control:
System.ServiceProcess.ServiceController - Update Frequency: 1 second polling timer
Process Lifecycle
Related Documentation
Installation Guide
Installing APM on Windows
Printer Configuration
Configure printers and devices