在我的批处理脚本中使用此命令时,该set
命令被解释为默认的 windows 批处理“设置环境命令”:
@echo off
echo "Always run this script as Administrator. If you don't the service will be installed but not correctly configured!"
set serviceName=MyApp
set serviceLabel=MyApp
set serviceExe=MyApp.exe
set maindir=C:\\Users\\MyUser\\Desktop\\MyApp\\
set nssm=%maindir%\\lib\\nssm-2.24\\win64\\nssm.exe
%nssm% install %serviceName% "%maindir%\\%serviceExe%"
我该如何防止这种情况?