- windows 安装目录 D:\nacos
路径根据实际情况调整下面脚本路径
- 在当前目录下创建 nacos.bat
@echo off
echo Starting Nacos at %DATE% %TIME% >> D:\nacos\nacos_startup.log
D:
CD D:\nacos\bin
start "" /b cmd /c "startup.cmd > D:\nacos\nacos_output.log 2>&1"
echo Nacos started at %DATE% %TIME% >> D:\nacos\nacos_startup.log
- 在当前目录下创建 nacos.vbs
Set ws = WScript.CreateObject("WScript.Shell")
ws.Run "D:\nacos\nacosStartAuto.bat", 0, False
- 将nacos.vbs文件 复制到 系统启动目录下即可
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
标签:log,windows,WScript,startup,nacos,echo,自启
From: https://www.cnblogs.com/qwer78/p/18546020