I have a small
warp server project on Windows that listen to a particular port and do something whenever I send a command to it by REST (for example:
POST http://10.10.10.1:5000/print). It's a small client for printing PDF / receipt directly from another computer.
It works. But my problem is when I had to
package the whole project, the Rust compiler give me an executable file (.exe). The application displays a terminal window when I run it. I want this terminal to be hidden somehow.
I try to run the program as a windows service (by using NSSM). It doesn't work for me since I had to access the printer. Windows doesn't allow my app to access any devices or any other executable as a windows service. (The reasons are explained here: .net - How can I run an EXE program from a Windows Service using C#? - Stack Overflow)
So I plan to run my app as a tray-icon application. (GitHub - olback/tray-item-rs: Multi-platform Tray Indicator)
Unfortunately, I still cannot hide the app's terminal window.
Do anyone know how to hide or get rid of it ?