nodejs后台启动

bat脚本

@echo off 
if "%1" == "h" goto begin 
mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit 
:begin 
node myserver.js
:end

vbs脚本

Set ws = CreateObject("Wscript.Shell") 
ws.run "node myserver.js",vbhide,true

但是这两个脚本都有一个问题,就是在window运行,还是会闪一下。

希望有大神解决一下

原文地址:https://www.cnblogs.com/hellowoody/p/3974005.html