简体   繁体   中英

Start the websocket server automatically on Windows without a visible command prompt window

I want to start a websocket server, like using the "php artisan websocket:serve", but that automatically start with windows, and without a windows of command prompt. I know how to do it on linux with supervisor, but i need to do that on Windows 7 with Xampp. I currently use a batch file that starts automatically with Windows, although it works correctly, I wish the command prompt window would not remain permanently visible, since the PC is used for other business stuff, and sometimes the user closes by error the window, stopping the socket server.

Of course, thank you very much for your answers and excuse my bad English.

There are several ways to start windows process without visible console window. First you could create windows service, some software support it natively or you could use utility like NSSM . Second: You could start program via task scheduler and tune task properties. Third: You could use utility like CHP to start program without console window. Remember one thing: If you start program without console window (and it is not a windows service), the only way to stop it is taskkill command or GUI Taskmanager.

要在 Windows 机器上初始化 websocket 服务器,无需命令提示符,只需将autoexec.bat设置为halt_threads 2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM